node/test/fixtures/test-runner/output/spec_reporter.snapshot
Miguel Marcondes Filho 4f5d11e6fb
lib: restructure assert to become a class
PR-URL: https://github.com/nodejs/node/pull/58253
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-08-05 14:15:02 +00:00

366 lines
8.6 KiB
Text

sync pass todo (*ms) # TODO
sync pass todo with message (*ms) # this is a passing todo
sync fail todo (*ms) # TODO
sync fail todo with message (*ms) # this is a failing todo
sync skip pass (*ms) # SKIP
sync skip pass with message (*ms) # this is skipped
sync pass (*ms)
this test should pass
sync throw fail (*ms)
async skip pass (*ms) # SKIP
async pass (*ms)
async throw fail (*ms)
async skip fail (*ms) # SKIP
async assertion fail (*ms)
resolve pass (*ms)
reject fail (*ms)
unhandled rejection - passes but warns (*ms)
async unhandled rejection - passes but warns (*ms)
immediate throw - passes but warns (*ms)
immediate reject - passes but warns (*ms)
immediate resolve pass (*ms)
subtest sync throw fail
+sync throw fail (*ms)
this subtest should make its parent test fail
subtest sync throw fail (*ms)
sync throw non-error fail (*ms)
level 0a
level 1a (*ms)
level 1b (*ms)
level 1c (*ms)
level 1d (*ms)
level 0a (*ms)
top level
+long running (*ms)
+short running
++short running (*ms)
+short running (*ms)
top level (*ms)
invalid subtest - pass but subtest fails (*ms)
sync skip option (*ms) # SKIP
sync skip option with message (*ms) # this is skipped
sync skip option is false fail (*ms)
<anonymous> (*ms)
functionOnly (*ms)
<anonymous> (*ms)
test with only a name provided (*ms)
<anonymous> (*ms)
<anonymous> (*ms) # SKIP
test with a name and options provided (*ms) # SKIP
functionAndOptions (*ms) # SKIP
callback pass (*ms)
callback fail (*ms)
sync t is this in test (*ms)
async t is this in test (*ms)
callback t is this in test (*ms)
callback also returns a Promise (*ms)
callback throw (*ms)
callback called twice (*ms)
callback called twice in different ticks (*ms)
callback called twice in future tick (*ms)
callback async throw (*ms)
callback async throw after done (*ms)
only is set on subtests but not in only mode
running subtest 1 (*ms)
running subtest 3 (*ms)
running subtest 4 (*ms)
only is set on subtests but not in only mode (*ms)
custom inspect symbol fail (*ms)
custom inspect symbol that throws fail (*ms)
subtest sync throw fails
sync throw fails at first (*ms)
sync throw fails at second (*ms)
subtest sync throw fails (*ms)
timed out async test (*ms)
timed out callback test (*ms)
large timeout async test is ok (*ms)
large timeout callback test is ok (*ms)
successful thenable (*ms)
rejected thenable (*ms)
unfinished test with uncaughtException (*ms)
unfinished test with unhandledRejection (*ms)
assertion errors display actual and expected properly (*ms)
invalid subtest fail (*ms)
Error: Test "unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:72:1 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.
Error: Test "async unhandled rejection - passes but warns" at test/fixtures/test-runner/output/output.js:76:1 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.
Error: 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.
Error: Test "immediate throw - passes but warns" at test/fixtures/test-runner/output/output.js:80:1 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.
Error: Test "immediate reject - passes but warns" at test/fixtures/test-runner/output/output.js:86:1 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.
Error: Test "callback called twice in different ticks" at test/fixtures/test-runner/output/output.js:251:1 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.
Error: Test "callback async throw after done" at test/fixtures/test-runner/output/output.js:269:1 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.
tests 75
suites 0
pass 36
fail 24
cancelled 2
skipped 9
todo 4
duration_ms *
failing tests:
*
sync fail todo (*ms) # TODO
Error: thrown from sync fail todo
*
*
*
*
*
*
*
*
sync fail todo with message (*ms) # this is a failing todo
Error: thrown from sync fail todo with message
*
*
*
*
*
*
*
*
sync throw fail (*ms)
Error: thrown from sync throw fail
*
*
*
*
*
*
*
*
async throw fail (*ms)
Error: thrown from async throw fail
*
*
*
*
*
*
*
*
async skip fail (*ms) # SKIP
Error: thrown from async throw fail
*
*
*
*
*
*
*
*
async assertion fail (*ms)
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
true !== false
*
*
*
*
*
*
* {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: true,
expected: false,
operator: 'strictEqual',
diff: 'simple'
}
*
reject fail (*ms)
Error: rejected from reject fail
*
*
*
*
*
*
*
*
+sync throw fail (*ms)
Error: thrown from subtest sync throw fail
*
*
*
*
*
*
*
*
*
*
*
sync throw non-error fail (*ms)
Symbol(thrown symbol from sync throw non-error fail)
*
sync skip option is false fail (*ms)
Error: this should be executed
*
*
*
*
*
*
*
*
callback fail (*ms)
Error: callback failure
*
*
*
callback also returns a Promise (*ms)
'passed a callback but also returned a Promise'
*
callback throw (*ms)
Error: thrown from callback throw
*
*
*
*
*
*
*
*
callback called twice (*ms)
'callback invoked multiple times'
*
callback called twice in future tick (*ms)
Error [ERR_TEST_FAILURE]: callback invoked multiple times
* {
code: 'ERR_TEST_FAILURE',
failureType: 'multipleCallbackInvocations',
cause: 'callback invoked multiple times'
}
*
callback async throw (*ms)
Error: thrown from callback async throw
*
*
*
custom inspect symbol fail (*ms)
customized
*
custom inspect symbol that throws fail (*ms)
{ foo: 1, Symbol(nodejs.util.inspect.custom): [Function: [nodejs.util.inspect.custom]] }
*
sync throw fails at first (*ms)
Error: thrown from subtest sync throw fails at first
*
*
*
*
*
*
*
*
*
*
*
sync throw fails at second (*ms)
Error: thrown from subtest sync throw fails at second
*
*
*
*
*
*
*
*
*
timed out async test (*ms)
'test timed out after *ms'
*
timed out callback test (*ms)
'test timed out after *ms'
*
rejected thenable (*ms)
'custom error'
*
unfinished test with uncaughtException (*ms)
Error: foo
*
*
*
*
unfinished test with unhandledRejection (*ms)
Error: bar
*
*
*
*
assertion errors display actual and expected properly (*ms)
AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal:
{
bar: 1,
baz: {
date: 1970-01-01T00:00:00.000Z,
null: null,
number: 1,
string: 'Hello',
undefined: undefined
},
boo: [
1
],
foo: 1
}
should loosely deep-equal
{
baz: {
date: 1970-01-01T00:00:00.000Z,
null: null,
number: 1,
string: 'Hello',
undefined: undefined
},
boo: [
1
],
circular: <ref *1> {
bar: 2,
c: [Circular *1]
}
}
* {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: [Object],
expected: [Object],
operator: 'deepEqual',
diff: 'simple'
}
*
invalid subtest fail (*ms)
'test could not be started because its parent finished'