Browse Source

Actually increment the `errors` counter on failures in `test-fixtures.js`/`test_fixtures_esprima.js`, so that the test runners won't incorrectly report that the tests passed

Jonas Jenwald 8 years ago
parent
commit
fe9a561d45
  1. 2
      external/builder/test-fixtures.js
  2. 2
      external/builder/test-fixtures_esprima.js

2
external/builder/test-fixtures.js vendored

@ -30,6 +30,8 @@ ls('*-expected.*').forEach(function(expectationFilename) {
out = ('Error: ' + e.message).replace(/^/gm, '//'); out = ('Error: ' + e.message).replace(/^/gm, '//');
} }
if (out !== expectation) { if (out !== expectation) {
errors++;
echo('Assertion failed for ' + inFilename); echo('Assertion failed for ' + inFilename);
echo('--------------------------------------------------'); echo('--------------------------------------------------');
echo('EXPECTED:'); echo('EXPECTED:');

2
external/builder/test-fixtures_esprima.js vendored

@ -33,6 +33,8 @@ ls('*-expected.*').forEach(function(expectationFilename) {
out = ('Error: ' + e.message).replace(/^/gm, '//'); out = ('Error: ' + e.message).replace(/^/gm, '//');
} }
if (out !== expectation) { if (out !== expectation) {
errors++;
echo('Assertion failed for ' + inFilename); echo('Assertion failed for ' + inFilename);
echo('--------------------------------------------------'); echo('--------------------------------------------------');
echo('EXPECTED:'); echo('EXPECTED:');

Loading…
Cancel
Save