From fe9a561d45de33e8db7d1d25a3193f94d88e91f0 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 10 Jan 2017 14:32:40 +0100 Subject: [PATCH] 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 --- external/builder/test-fixtures.js | 2 ++ external/builder/test-fixtures_esprima.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/external/builder/test-fixtures.js b/external/builder/test-fixtures.js index 53c0cd8b6..12fc8af89 100644 --- a/external/builder/test-fixtures.js +++ b/external/builder/test-fixtures.js @@ -30,6 +30,8 @@ ls('*-expected.*').forEach(function(expectationFilename) { out = ('Error: ' + e.message).replace(/^/gm, '//'); } if (out !== expectation) { + errors++; + echo('Assertion failed for ' + inFilename); echo('--------------------------------------------------'); echo('EXPECTED:'); diff --git a/external/builder/test-fixtures_esprima.js b/external/builder/test-fixtures_esprima.js index aac26bd50..108d9a35a 100644 --- a/external/builder/test-fixtures_esprima.js +++ b/external/builder/test-fixtures_esprima.js @@ -33,6 +33,8 @@ ls('*-expected.*').forEach(function(expectationFilename) { out = ('Error: ' + e.message).replace(/^/gm, '//'); } if (out !== expectation) { + errors++; + echo('Assertion failed for ' + inFilename); echo('--------------------------------------------------'); echo('EXPECTED:');