Commit c1051a0 1 parent 8b690a1 commit c1051a0 Copy full SHA for c1051a0
File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -1154,8 +1154,11 @@ import process from 'node:process';
1154
1154
import path from ' node:path' ;
1155
1155
1156
1156
run ({ files: [path .resolve (' ./tests/test.js' )] })
1157
- .compose (tap)
1158
- .pipe (process .stdout );
1157
+ .on (' test:fail' , () => {
1158
+ process .exitCode = 1 ;
1159
+ })
1160
+ .compose (tap)
1161
+ .pipe (process .stdout );
1159
1162
```
1160
1163
1161
1164
``` cjs
@@ -1164,8 +1167,11 @@ const { run } = require('node:test');
1164
1167
const path = require (' node:path' );
1165
1168
1166
1169
run ({ files: [path .resolve (' ./tests/test.js' )] })
1167
- .compose (tap)
1168
- .pipe (process .stdout );
1170
+ .on (' test:fail' , () => {
1171
+ process .exitCode = 1 ;
1172
+ })
1173
+ .compose (tap)
1174
+ .pipe (process .stdout );
1169
1175
```
1170
1176
1171
1177
## ` test([name][, options][, fn]) `
You can’t perform that action at this time.
0 commit comments