theintern / intern

A next-generation code testing stack for JavaScript.
https://theintern.io/
Other
4.36k stars 311 forks source link

CI jobs can pass when certain build errors occur #1085

Closed jason0x43 closed 4 years ago

jason0x43 commented 4 years ago

A recent CI job appeared to pass. However, the run log shows an error during the test build process (not the testing process itself):

Building test Intern...
Building browser tests...
Compiling bin...
(node:6003) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 1: npx webpack --config webpack-tests.config.ts
Unexpected token '?'
    at makeError (/home/travis/build/theintern/intern/node_modules/execa/lib/error.js:58:11)
    at handlePromise (/home/travis/build/theintern/intern/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 1)
    at main (/home/travis/build/theintern/intern/scripts/test.ts:47:5)
(node:6003) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:6003) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Compiling lib...
Running webpack...
Copying resources...
Done building Intern

The test script should have failed when the error occurred, which should have led to a failing test run.