()
| 286 | // `$node --abort-on-uncaught-exception $file child` |
| 287 | // the process aborts. |
| 288 | function childShouldThrowAndAbort() { |
| 289 | const escapedArgs = escapePOSIXShell`"${process.argv[0]}" --abort-on-uncaught-exception "${process.argv[1]}" child`; |
| 290 | if (!isWindows) { |
| 291 | // Do not create core files, as it can take a lot of disk space on |
| 292 | // continuous testing and developers' machines |
| 293 | escapedArgs[0] = 'ulimit -c 0 && ' + escapedArgs[0]; |
| 294 | } |
| 295 | const { exec } = require('child_process'); |
| 296 | const child = exec(...escapedArgs); |
| 297 | child.on('exit', function onExit(exitCode, signal) { |
| 298 | const errMsg = 'Test should have aborted ' + |
| 299 | `but instead exited with exit code ${exitCode}` + |
| 300 | ` and signal ${signal}`; |
| 301 | assert(nodeProcessAborted(exitCode, signal), errMsg); |
| 302 | }); |
| 303 | } |
| 304 | |
| 305 | const pwdCommand = isWindows ? |
| 306 | ['cmd.exe', ['/d', '/c', 'cd']] : |
nothing calls this directly
no test coverage detected
searching dependent graphs…