diff --git a/lib/internal/test_runner/harness.js b/lib/internal/test_runner/harness.js index 6482272151b176..a445d1a1d66754 100644 --- a/lib/internal/test_runner/harness.js +++ b/lib/internal/test_runner/harness.js @@ -14,10 +14,12 @@ const { codes: { ERR_TEST_FAILURE, }, + inspectWithNoCustomRetry, } = require('internal/errors'); const { exitCodes: { kGenericUserError } } = internalBinding('errors'); const { kEmptyObject } = require('internal/util'); +const colors = require('internal/util/colors'); const { kCancelledByParent, Test, Suite } = require('internal/test_runner/test'); const { parseCommandLine, @@ -56,16 +58,18 @@ function createProcessEventHandler(eventName, rootTest) { // If the test is already finished or the resource that created the error // is not mapped to a Test, report this as a top level diagnostic. let msg; + const inspectOptions = { __proto__: null, colors: colors.shouldColorize(process.stdout), breakLength: Infinity }; if (test) { msg = `Warning: Test "${test.name}" generated asynchronous ` + 'activity after the test ended. This activity created the error ' + `"${err}" and would have caused the test to fail, but instead ` + - `triggered an ${eventName} event.\nStack: ${err.stack}`; + `triggered an ${eventName} event.\n${inspectWithNoCustomRetry(err, inspectOptions)}`; } else { msg = 'Warning: A resource generated asynchronous activity after ' + `the test ended. This activity created the error "${err}" which ` + - `triggered an ${eventName} event, caught by the test runner.\nStack: ${err.stack}`; + `triggered an ${eventName} event, caught by the test runner.\n` + + inspectWithNoCustomRetry(err, inspectOptions); } rootTest.diagnostic(msg); diff --git a/test/fixtures/test-runner/output/describe_it.snapshot b/test/fixtures/test-runner/output/describe_it.snapshot index 3763bc97c8e3d7..aa53f8b10ea3e3 100644 --- a/test/fixtures/test-runner/output/describe_it.snapshot +++ b/test/fixtures/test-runner/output/describe_it.snapshot @@ -693,12 +693,12 @@ not ok 58 - invalid subtest fail * ... 1..58 -# Warning: Test "unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nStack: Error: rejected from unhandled rejection fail\\n at TestContext. (/test/fixtures/test-runner/output/describe_it.js:(LINE):18)\\n at Test.runInAsyncScope (node:async_hooks:206:9)\\n at Test.run (node:internal/test_runner/test:641:25)\\n at Test.processPendingSubtests (node:internal/test_runner/test:382:18)\\n at Test.postRun (node:internal/test_runner/test:732:19)\\n at Test.run (node:internal/test_runner/test:690:12)\\n at async Test.processPendingSubtests (node:internal/test_runner/test:382:7) -# Warning: Test "async unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nStack: Error: rejected from async unhandled rejection fail\\n at TestContext. (/test/fixtures/test-runner/output/describe_it.js:(LINE):18)\\n at Test.runInAsyncScope (node:async_hooks:206:9)\\n at Test.run (node:internal/test_runner/test:641:25)\\n at Test.processPendingSubtests (node:internal/test_runner/test:382:18)\\n at Test.postRun (node:internal/test_runner/test:732:19)\\n at Test.run (node:internal/test_runner/test:690:12)\\n at async Test.processPendingSubtests (node:internal/test_runner/test:382:7) -# Warning: Test "immediate throw - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nStack: Error: thrown from immediate throw fail\\n at Immediate. (/test/fixtures/test-runner/output/describe_it.js:(LINE):11)\\n at process.processImmediate (node:internal/timers:478:21) -# Warning: Test "immediate reject - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nStack: Error: rejected from immediate reject fail\\n at Immediate. (/test/fixtures/test-runner/output/describe_it.js:(LINE):20)\\n at process.processImmediate (node:internal/timers:478:21) -# Warning: Test "callback called twice in different ticks" generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nStack: Error [ERR_TEST_FAILURE]: callback invoked multiple times -# Warning: Test "callback async throw after done" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nStack: Error: thrown from callback async throw after done\\n at Immediate. (/test/fixtures/test-runner/output/describe_it.js:(LINE):11)\\n at process.processImmediate (node:internal/timers:478:21) +# Warning: Test "unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nError: rejected from unhandled rejection fail\\n at TestContext. (/test/fixtures/test-runner/output/describe_it.js:(LINE):18)\\n at Test.runInAsyncScope (node:async_hooks:206:9)\\n at Test.run (node:internal/test_runner/test:641:25)\\n at Test.processPendingSubtests (node:internal/test_runner/test:382:18)\\n at Test.postRun (node:internal/test_runner/test:732:19)\\n at Test.run (node:internal/test_runner/test:690:12)\\n at async Test.processPendingSubtests (node:internal/test_runner/test:382:7) +# Warning: Test "async unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nError: rejected from async unhandled rejection fail\\n at TestContext. (/test/fixtures/test-runner/output/describe_it.js:(LINE):18)\\n at Test.runInAsyncScope (node:async_hooks:206:9)\\n at Test.run (node:internal/test_runner/test:641:25)\\n at Test.processPendingSubtests (node:internal/test_runner/test:382:18)\\n at Test.postRun (node:internal/test_runner/test:732:19)\\n at Test.run (node:internal/test_runner/test:690:12)\\n at async Test.processPendingSubtests (node:internal/test_runner/test:382:7) +# Warning: Test "immediate throw - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nError: thrown from immediate throw fail\\n at Immediate. (/test/fixtures/test-runner/output/describe_it.js:(LINE):11)\\n at process.processImmediate (node:internal/timers:478:21) +# Warning: Test "immediate reject - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nError: rejected from immediate reject fail\\n at Immediate. (/test/fixtures/test-runner/output/describe_it.js:(LINE):20)\\n at process.processImmediate (node:internal/timers:478:21) +# Warning: Test "callback called twice in different ticks" generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event.\\n[Error [ERR_TEST_FAILURE]: callback invoked multiple times] { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' } +# Warning: Test "callback async throw after done" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nError: thrown from callback async throw after done\\n at Immediate. (/test/fixtures/test-runner/output/describe_it.js:(LINE):11)\\n at process.processImmediate (node:internal/timers:478:21) # tests 67 # suites 11 # pass 31 diff --git a/test/fixtures/test-runner/output/junit_reporter.snapshot b/test/fixtures/test-runner/output/junit_reporter.snapshot index 03bb56415e2ecc..19601ebf5e6c46 100644 --- a/test/fixtures/test-runner/output/junit_reporter.snapshot +++ b/test/fixtures/test-runner/output/junit_reporter.snapshot @@ -473,7 +473,7 @@ Error [ERR_TEST_FAILURE]: test could not be started because its parent finished +[Error [ERR_TEST_FAILURE]: callback invoked multiple times] { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' } --> diff --git a/test/fixtures/test-runner/output/output.snapshot b/test/fixtures/test-runner/output/output.snapshot index 4473dc0cbb5250..57ecfdd5005ac4 100644 --- a/test/fixtures/test-runner/output/output.snapshot +++ b/test/fixtures/test-runner/output/output.snapshot @@ -676,13 +676,13 @@ not ok 62 - invalid subtest fail * ... 1..62 -# Warning: Test "unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nStack: Error: rejected from unhandled rejection fail\\n at TestContext. (/test/fixtures/test-runner/output/output.js:(LINE):18)\\n at Test.runInAsyncScope (node:async_hooks:206:9)\\n at Test.run (node:internal/test_runner/test:641:25)\\n at Test.processPendingSubtests (node:internal/test_runner/test:382:18)\\n at Test.postRun (node:internal/test_runner/test:732:19)\\n at Test.run (node:internal/test_runner/test:690:12)\\n at async Test.processPendingSubtests (node:internal/test_runner/test:382:7) -# Warning: Test "async unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nStack: Error: rejected from async unhandled rejection fail\\n at TestContext. (/test/fixtures/test-runner/output/output.js:(LINE):18)\\n at Test.runInAsyncScope (node:async_hooks:206:9)\\n at Test.run (node:internal/test_runner/test:641:25)\\n at Test.processPendingSubtests (node:internal/test_runner/test:382:18)\\n at Test.postRun (node:internal/test_runner/test:732:19)\\n at Test.run (node:internal/test_runner/test:690:12)\\n at async Test.processPendingSubtests (node:internal/test_runner/test:382:7) -# Warning: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner.\\nStack: Error: uncaught from outside of a test\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):9)\\n at process.processImmediate (node:internal/timers:478:21) -# Warning: Test "immediate throw - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nStack: Error: thrown from immediate throw fail\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):11)\\n at process.processImmediate (node:internal/timers:478:21) -# Warning: Test "immediate reject - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nStack: Error: rejected from immediate reject fail\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):20)\\n at process.processImmediate (node:internal/timers:478:21) -# Warning: Test "callback called twice in different ticks" generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nStack: Error [ERR_TEST_FAILURE]: callback invoked multiple times -# Warning: Test "callback async throw after done" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nStack: Error: thrown from callback async throw after done\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):11)\\n at process.processImmediate (node:internal/timers:478:21) +# Warning: Test "unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nError: rejected from unhandled rejection fail\\n at TestContext. (/test/fixtures/test-runner/output/output.js:(LINE):18)\\n at Test.runInAsyncScope (node:async_hooks:206:9)\\n at Test.run (node:internal/test_runner/test:641:25)\\n at Test.processPendingSubtests (node:internal/test_runner/test:382:18)\\n at Test.postRun (node:internal/test_runner/test:732:19)\\n at Test.run (node:internal/test_runner/test:690:12)\\n at async Test.processPendingSubtests (node:internal/test_runner/test:382:7) +# Warning: Test "async unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nError: rejected from async unhandled rejection fail\\n at TestContext. (/test/fixtures/test-runner/output/output.js:(LINE):18)\\n at Test.runInAsyncScope (node:async_hooks:206:9)\\n at Test.run (node:internal/test_runner/test:641:25)\\n at Test.processPendingSubtests (node:internal/test_runner/test:382:18)\\n at Test.postRun (node:internal/test_runner/test:732:19)\\n at Test.run (node:internal/test_runner/test:690:12)\\n at async Test.processPendingSubtests (node:internal/test_runner/test:382:7) +# Warning: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner.\\nError: uncaught from outside of a test\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):9)\\n at process.processImmediate (node:internal/timers:478:21) +# Warning: Test "immediate throw - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nError: thrown from immediate throw fail\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):11)\\n at process.processImmediate (node:internal/timers:478:21) +# Warning: Test "immediate reject - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nError: rejected from immediate reject fail\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):20)\\n at process.processImmediate (node:internal/timers:478:21) +# Warning: Test "callback called twice in different ticks" generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event.\\n[Error [ERR_TEST_FAILURE]: callback invoked multiple times] { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' } +# Warning: Test "callback async throw after done" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nError: thrown from callback async throw after done\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):11)\\n at process.processImmediate (node:internal/timers:478:21) # tests 76 # suites 0 # pass 35 diff --git a/test/fixtures/test-runner/output/output_cli.snapshot b/test/fixtures/test-runner/output/output_cli.snapshot index 545556273db64b..0ac8877f2717be 100644 --- a/test/fixtures/test-runner/output/output_cli.snapshot +++ b/test/fixtures/test-runner/output/output_cli.snapshot @@ -675,13 +675,13 @@ not ok 62 - invalid subtest fail stack: |- * ... -# Warning: Test "unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nStack: Error: rejected from unhandled rejection fail\\n at TestContext. (/test/fixtures/test-runner/output/output.js:(LINE):18)\\n at Test.runInAsyncScope (node:async_hooks:206:9)\\n at Test.run (node:internal/test_runner/test:641:25)\\n at Test.processPendingSubtests (node:internal/test_runner/test:382:18)\\n at Test.postRun (node:internal/test_runner/test:732:19)\\n at Test.run (node:internal/test_runner/test:690:12)\\n at async Test.processPendingSubtests (node:internal/test_runner/test:382:7) -# Warning: Test "async unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nStack: Error: rejected from async unhandled rejection fail\\n at TestContext. (/test/fixtures/test-runner/output/output.js:(LINE):18)\\n at Test.runInAsyncScope (node:async_hooks:206:9)\\n at Test.run (node:internal/test_runner/test:641:25)\\n at Test.processPendingSubtests (node:internal/test_runner/test:382:18)\\n at Test.postRun (node:internal/test_runner/test:732:19)\\n at Test.run (node:internal/test_runner/test:690:12)\\n at async Test.processPendingSubtests (node:internal/test_runner/test:382:7) -# Warning: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner.\\nStack: Error: uncaught from outside of a test\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):9)\\n at process.processImmediate (node:internal/timers:478:21) -# Warning: Test "immediate throw - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nStack: Error: thrown from immediate throw fail\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):11)\\n at process.processImmediate (node:internal/timers:478:21) -# Warning: Test "immediate reject - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nStack: Error: rejected from immediate reject fail\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):20)\\n at process.processImmediate (node:internal/timers:478:21) -# Warning: Test "callback called twice in different ticks" generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nStack: Error [ERR_TEST_FAILURE]: callback invoked multiple times -# Warning: Test "callback async throw after done" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nStack: Error: thrown from callback async throw after done\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):11)\\n at process.processImmediate (node:internal/timers:478:21) +# Warning: Test "unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nError: rejected from unhandled rejection fail\\n at TestContext. (/test/fixtures/test-runner/output/output.js:(LINE):18)\\n at Test.runInAsyncScope (node:async_hooks:206:9)\\n at Test.run (node:internal/test_runner/test:641:25)\\n at Test.processPendingSubtests (node:internal/test_runner/test:382:18)\\n at Test.postRun (node:internal/test_runner/test:732:19)\\n at Test.run (node:internal/test_runner/test:690:12)\\n at async Test.processPendingSubtests (node:internal/test_runner/test:382:7) +# Warning: Test "async unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nError: rejected from async unhandled rejection fail\\n at TestContext. (/test/fixtures/test-runner/output/output.js:(LINE):18)\\n at Test.runInAsyncScope (node:async_hooks:206:9)\\n at Test.run (node:internal/test_runner/test:641:25)\\n at Test.processPendingSubtests (node:internal/test_runner/test:382:18)\\n at Test.postRun (node:internal/test_runner/test:732:19)\\n at Test.run (node:internal/test_runner/test:690:12)\\n at async Test.processPendingSubtests (node:internal/test_runner/test:382:7) +# Warning: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner.\\nError: uncaught from outside of a test\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):9)\\n at process.processImmediate (node:internal/timers:478:21) +# Warning: Test "immediate throw - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nError: thrown from immediate throw fail\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):11)\\n at process.processImmediate (node:internal/timers:478:21) +# Warning: Test "immediate reject - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event.\\nError: rejected from immediate reject fail\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):20)\\n at process.processImmediate (node:internal/timers:478:21) +# Warning: Test "callback called twice in different ticks" generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event.\\n[Error [ERR_TEST_FAILURE]: callback invoked multiple times] { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' } +# Warning: Test "callback async throw after done" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event.\\nError: thrown from callback async throw after done\\n at Immediate. (/test/fixtures/test-runner/output/output.js:(LINE):11)\\n at process.processImmediate (node:internal/timers:478:21) # Subtest: last test ok 63 - last test --- diff --git a/test/fixtures/test-runner/output/spec_reporter.snapshot b/test/fixtures/test-runner/output/spec_reporter.snapshot index c4e71ee89cdc22..4f417dee54a90f 100644 --- a/test/fixtures/test-runner/output/spec_reporter.snapshot +++ b/test/fixtures/test-runner/output/spec_reporter.snapshot @@ -284,7 +284,7 @@ 'test could not be started because its parent finished' Warning: Test "unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -Stack: Error: rejected from unhandled rejection fail +Error: rejected from unhandled rejection fail * * * @@ -293,7 +293,7 @@ Stack: Error: rejected from unhandled rejection fail * * Warning: Test "async unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -Stack: Error: rejected from async unhandled rejection fail +Error: rejected from async unhandled rejection fail * * * @@ -302,21 +302,21 @@ Stack: Error: rejected from async unhandled rejection fail * * Warning: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner. -Stack: Error: uncaught from outside of a test +Error: uncaught from outside of a test * * Warning: Test "immediate throw - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. -Stack: Error: thrown from immediate throw fail +Error: thrown from immediate throw fail * * Warning: Test "immediate reject - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -Stack: Error: rejected from immediate reject fail +Error: rejected from immediate reject fail * * Warning: Test "callback called twice in different ticks" generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. -Stack: Error [ERR_TEST_FAILURE]: callback invoked multiple times +[Error [ERR_TEST_FAILURE]: callback invoked multiple times] { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' } Warning: Test "callback async throw after done" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. -Stack: Error: thrown from callback async throw after done +Error: thrown from callback async throw after done * * tests 76 diff --git a/test/fixtures/test-runner/output/spec_reporter_cli.snapshot b/test/fixtures/test-runner/output/spec_reporter_cli.snapshot index 1c2b44e6bdac8f..e8356d803be111 100644 --- a/test/fixtures/test-runner/output/spec_reporter_cli.snapshot +++ b/test/fixtures/test-runner/output/spec_reporter_cli.snapshot @@ -284,7 +284,7 @@ 'test could not be started because its parent finished' Warning: Test "unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -Stack: Error: rejected from unhandled rejection fail +Error: rejected from unhandled rejection fail * * * @@ -293,7 +293,7 @@ Stack: Error: rejected from unhandled rejection fail * * Warning: Test "async unhandled rejection - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from async unhandled rejection fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -Stack: Error: rejected from async unhandled rejection fail +Error: rejected from async unhandled rejection fail * * * @@ -302,21 +302,21 @@ Stack: Error: rejected from async unhandled rejection fail * * Warning: A resource generated asynchronous activity after the test ended. This activity created the error "Error: uncaught from outside of a test" which triggered an uncaughtException event, caught by the test runner. -Stack: Error: uncaught from outside of a test +Error: uncaught from outside of a test * * Warning: Test "immediate throw - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from immediate throw fail" and would have caused the test to fail, but instead triggered an uncaughtException event. -Stack: Error: thrown from immediate throw fail +Error: thrown from immediate throw fail * * Warning: Test "immediate reject - passes but warns" generated asynchronous activity after the test ended. This activity created the error "Error: rejected from immediate reject fail" and would have caused the test to fail, but instead triggered an unhandledRejection event. -Stack: Error: rejected from immediate reject fail +Error: rejected from immediate reject fail * * Warning: Test "callback called twice in different ticks" generated asynchronous activity after the test ended. This activity created the error "Error [ERR_TEST_FAILURE]: callback invoked multiple times" and would have caused the test to fail, but instead triggered an uncaughtException event. -Stack: Error [ERR_TEST_FAILURE]: callback invoked multiple times +[Error [ERR_TEST_FAILURE]: callback invoked multiple times] { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' } Warning: Test "callback async throw after done" generated asynchronous activity after the test ended. This activity created the error "Error: thrown from callback async throw after done" and would have caused the test to fail, but instead triggered an uncaughtException event. -Stack: Error: thrown from callback async throw after done +Error: thrown from callback async throw after done * * tests 76