TypeError: a.replace is not a function
describe('Beschreibung', function () {
it('Testcasename', () => {
});
});
logout ();describe('Beschreibung', function () {
it('Testcasename', () => {
logout ();
});
});
let code = 'login (';
let initialLength = code.length;
let methodEnded = false;
JSONblock.args0.forEach(argument => {
if(argument.type === 'input_value' && !methodEnded) {
let value = Blockly.JavaScript.valueToCode(block, argument.name, Blockly.JavaScript.ORDER_FUNCTION_CALL)
if (value) {
code += value + ', ';
} else {
methodEnded = true;
}
}
})
return (code.length === initialLength)
? [code + ');\n', Blockly.JavaScript.ORDER_FUNCTION_CALL] // arguments are added
: [code.slice(0,-2) + ');\n', Blockly.JavaScript.ORDER_FUNCTION_CALL] // no arguments are added
}--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Blockly.JavaScript['testcase'] = function(block) {
var statements_name = Blockly.JavaScript.statementToCode(block, 'Methoden');
var text_tcn = block.getFieldValue('TCN');
var code = 'it(\''+ text_tcn +'\', () => {\n'
code += statements_name;
code += '});\n'
return code; Blockly.JavaScript['defaultblock'] = function(block) {
var statements_name = Blockly.JavaScript.statementToCode(block, 'Testcases');
var text_description = block.getFieldValue('description');
var code = 'describe(\''+ text_description +'\', function () {\n'
code += statements_name;
code += '});'
return code;
}; Blockly.JavaScript[JSONblock.type] = function(block) {
var values = [];
JSONblock.args0.forEach(argument => {
if (Blockly.JavaScript.valueToCode(block, argument.name, Blockly.JavaScript.ORDER_FUNCTION_CALL)) {
values.push(Blockly.JavaScript.valueToCode(block, argument.name, Blockly.JavaScript.ORDER_FUNCTION_CALL))
}
})
var code = JSONblock.type + '(' + values + ')\n'
return code;
}