Add suite name to generator tests

This commit is contained in:
Rachel Fenichel
2018-10-18 17:47:58 -07:00
parent 5fcadc0a05
commit adb1921e21
16 changed files with 42 additions and 6 deletions

View File

@@ -60,6 +60,11 @@ Blockly.JavaScript['unittest_main'] = function(block) {
'}']);
// Setup global to hold test results.
var code = resultsVar + ' = [];\n';
// Say which test suite this is.
code += 'console.log(\'\\n====================\\n\\n' +
'Running suite: ' +
block.getFieldValue('SUITE_NAME') +
'\')\n';
// Run tests (unindented).
code += Blockly.JavaScript.statementToCode(block, 'DO')
.replace(/^ /, '').replace(/\n /g, '\n');