Skip to content

Commit ae3a3f0

Browse files
jugglinmikerwaldron
authored andcommitted
Do not report error for test failures
Test failures are not an exceptional event. By reporting them as though they are exceptional, test262-harness forces consumers to ignore the status code. This makes it difficult to detect true operational errors, e.g. when the interpreter under test crashes, since they are indistinguishable from test failures. Consumers who wish to react to test failures should do so by parsing the tool's output.
1 parent f30b6b2 commit ae3a3f0

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

bin/run.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,6 @@ const results = zip(pool, tests).pipe(
178178
);
179179

180180
const emitter = new ResultsEmitter(results);
181-
emitter.on('fail', function () {
182-
process.exitCode = 1;
183-
});
184181
reporter(emitter, reporterOpts);
185182

186183
function printVersion() {

test/test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const tests = [
3636
'--includesDir', './test/test-includes',
3737
'./test/collateral/test/**/*.js',
3838
],
39-
{ exitCode: 1 },
4039
],
4140
[
4241
[
@@ -48,7 +47,7 @@ const tests = [
4847
'--includesDir', './test-includes',
4948
'collateral/test/**/*.js',
5049
],
51-
{ cwd: 'test', exitCode: 1 },
50+
{ cwd: 'test' },
5251
],
5352
[
5453
[
@@ -117,7 +116,6 @@ const tests = [
117116
'--reporter-keys', 'attrs,result,rawResult',
118117
'./test/collateral-preprocessor/test/autofail.js',
119118
],
120-
{ exitCode: 1 },
121119
],
122120
].reduce((accum, a) => {
123121
let b = a.slice();

0 commit comments

Comments
 (0)