From 9b80af2d67da20b33fdcdbd8ea197630ae8ac5d3 Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 17 Nov 2017 10:20:58 -0500 Subject: [PATCH] Mark failures with "(strict)" or "(non-strict)" Before: $ test262-harness --hostType jsc --hostPath `which jsc` test/language/function-code/each-param-has-own-*.js FAIL test/language/function-code/each-param-has-own-non-shared-eval-scope.js Expected a ReferenceError to be thrown but no exception was thrown at all FAIL test/language/function-code/each-param-has-own-scope.js Expected a ReferenceError to be thrown but no exception was thrown at all Ran 4 tests 2 passed 2 failed After: $ test262-harness --hostType jsc --hostPath `which jsc` test/language/function-code/each-param-has-own-*.js FAIL test/language/function-code/each-param-has-own-non-shared-eval-scope.js (non-strict) Expected a ReferenceError to be thrown but no exception was thrown at all FAIL test/language/function-code/each-param-has-own-scope.js (non-strict) Expected a ReferenceError to be thrown but no exception was thrown at all Ran 4 tests 2 passed 2 failed --- lib/reporters/simple.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/reporters/simple.js b/lib/reporters/simple.js index bc7ad02..da709c0 100644 --- a/lib/reporters/simple.js +++ b/lib/reporters/simple.js @@ -10,24 +10,24 @@ function simpleReporter(results) { clearPassed(); lastPassed = true; - process.stdout.write('PASS ' + test.file); + process.stdout.write(`PASS ${test.file}`); }); results.on('fail', function (test) { failed++; clearPassed(); lastPassed = false; - console.log('FAIL ' + test.file); - console.log(' ' + test.result.message); + console.log(`FAIL ${test.file}${test.strictMode ? ' (strict)' : ' (non-strict)'}`); + console.log(` ${test.result.message}`); console.log(''); }); results.on('end', function () { clearPassed(); - console.log('Ran ' + (passed + failed) + ' tests') - console.log(passed + ' passed') - console.log(failed + ' failed') + console.log(`Ran ${(passed + failed)} tests`); + console.log(`${passed} passed`); + console.log(`${failed} failed`); }); function clearPassed() {