fix(inspect): allow single-line format when breakLength is Infinity#64238
Open
hamidrezaghavami wants to merge 3 commits into
Open
fix(inspect): allow single-line format when breakLength is Infinity#64238hamidrezaghavami wants to merge 3 commits into
hamidrezaghavami wants to merge 3 commits into
Annotations
6 errors and 1 notice
|
Test
Process completed with exit code 2.
|
|
Test:
test/test-runner/test-output-spec-reporter-cli.mjs#L0
--- stderr ---
node:internal/modules/run_main:107
triggerUncaughtException(
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
... Skipped lines
'✔ sync expect fail (method) (*ms) # EXPECTED FAILURE\n' +
'✔ sync expect fail (options) (*ms) # EXPECTED FAILURE\n' +
'✔ async expect fail (method) (*ms) # EXPECTED FAILURE\n' +
'✔ async expect fail (options) (*ms) # EXPECTED FAILURE\n' +
'✔ sync todo with expect fail (*ms) # TODO\n' +
...
' at <node-internal-frames>\n' +
+ " at async Test.processPendingSubtests (node:internal/test_runner/test:960:7) { generatedMessage: true, code: 'ERR_ASSERTION', actual: true, expected: false, operator: 'strictEqual', diff: 'simple' }\n" +
- ' at <node-internal-frames> {\n' +
- ' generatedMessage: true,\n' +
- " code: 'ERR_ASSERTION',\n" +
- ' actual: true,\n' +
- ' expected: false,\n' +
- " operator: 'strictEqual',\n" +
- " diff: 'simple'\n" +
- ' }\n' +
'\n' +
'test at test/fixtures/test-runner/output/output.js:92:1\n' +
'✖ reject fail (*ms)\n' +
' Error: rejected from reject fail\n' +
' at TestContext.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:93:25)\n' +
...
' Error [ERR_TEST_FAILURE]: callback invoked multiple times\n' +
+ " at Immediate.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:283:5) { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' }\n" +
- ' at Immediate.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:283:5) {\n' +
- " code: 'ERR_TEST_FAILURE',\n" +
- " failureType: 'multipleCallbackInvocations',\n" +
- " cause: 'callback invoked multiple times'\n" +
- ' }\n' +
'\n' +
'test at test/fixtures/test-runner/output/output.js:287:1\n' +
'✖ callback async throw (*ms)\n' +
' Error: thrown from callback async throw\n' +
' at Immediate.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:289:11)\n' +
...
'\n' +
+ 'test at test/fixtures/'... 2953 more characters
- 'test at test/fixtures/test-runne'... 2969 more characters
at assertSnapshot (/Users/runner/work/node/node/node/test/common/assertSnapshot.js:173:12)
at async spawnAndAssert (/Users/runner/work/node/node/node/test/common/assertSnapshot.js:208:3)
at async file:///Users/runner/work/node/node/node/test/test-runner/test-output-spec-reporter-cli.mjs:8:1 {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '✔ sync expect fail (method) (*ms) # EXPECTED FAILURE\n' +
'✔ sync expect fail (options) (*ms) # EXPECTED FAILURE\n' +
'✔ async expect fail (method) (*ms) # EXPECTED FAILURE\n' +
'✔ async expect fail (options) (*ms) # EXPECTED FAILURE\n' +
'✔ sync todo with expect fail (*ms) # TODO\n' +
'﹣ sync skip expect fail (*ms) # SKIP\n' +
'✔ sync pass todo (*ms) # TODO\n' +
'✔ sync pass todo with message (*ms) # this is a passing todo\n' +
'⚠ sync fail todo (*ms) # TODO\n' +
'⚠ sync fail todo with message (*ms) # this is a failing todo\n' +
'﹣ sync skip pass (*ms) # SKIP\n' +
'﹣ sync skip pass with message (*ms) # this is skipped\n' +
'✔ sync pass (*ms)\n' +
'ℹ this test should pass\n' +
'✖ sync throw fail (*ms)\n' +
'﹣ async skip pass (*ms) # SKIP\n' +
'✔ async pass (*ms)\n' +
'✖ async throw fail (*ms)\n' +
'﹣ async skip fail (*ms) # SKIP\n' +
'✖ async assertion fail (*ms)\n' +
'✔ resolve pass (*ms)\n' +
'✖ reject fail (*ms)\n' +
'✔ unhandled rejection - passes but warns (*ms)\n' +
'✔ async unhandled rejection - passes but warns (*ms)\n' +
'✔ immediate throw - passes but warns (*ms)\n' +
'✔ immediate reject - passes but warns (*ms)\n' +
'✔ immediate resolve pass (*ms)\n' +
'▶ subtest sync throw fail\n' +
' ✖ +sync throw fail (*ms)\n' +
' ℹ this subtest should ma
|
|
Test:
test/test-runner/test-output-spec-reporter.mjs#L0
--- stderr ---
node:internal/modules/run_main:107
triggerUncaughtException(
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
... Skipped lines
'✔ sync expect fail (method) (*ms) # EXPECTED FAILURE\n' +
'✔ sync expect fail (options) (*ms) # EXPECTED FAILURE\n' +
'✔ async expect fail (method) (*ms) # EXPECTED FAILURE\n' +
'✔ async expect fail (options) (*ms) # EXPECTED FAILURE\n' +
'✔ sync todo with expect fail (*ms) # TODO\n' +
...
' at <node-internal-frames>\n' +
+ " at async Test.processPendingSubtests (node:internal/test_runner/test:960:7) { generatedMessage: true, code: 'ERR_ASSERTION', actual: true, expected: false, operator: 'strictEqual', diff: 'simple' }\n" +
- ' at <node-internal-frames> {\n' +
- ' generatedMessage: true,\n' +
- " code: 'ERR_ASSERTION',\n" +
- ' actual: true,\n' +
- ' expected: false,\n' +
- " operator: 'strictEqual',\n" +
- " diff: 'simple'\n" +
- ' }\n' +
'\n' +
'test at test/fixtures/test-runner/output/output.js:92:1\n' +
'✖ reject fail (*ms)\n' +
' Error: rejected from reject fail\n' +
' at TestContext.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:93:25)\n' +
...
' Error [ERR_TEST_FAILURE]: callback invoked multiple times\n' +
+ " at Immediate.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:283:5) { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' }\n" +
- ' at Immediate.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:283:5) {\n' +
- " code: 'ERR_TEST_FAILURE',\n" +
- " failureType: 'multipleCallbackInvocations',\n" +
- " cause: 'callback invoked multiple times'\n" +
- ' }\n' +
'\n' +
'test at test/fixtures/test-runner/output/output.js:287:1\n' +
'✖ callback async throw (*ms)\n' +
' Error: thrown from callback async throw\n' +
' at Immediate.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:289:11)\n' +
...
'✖ sync throw fails at first (*ms)\n' +
+ ' Error: thrown from'... 2580 more characters
- ' Error: thrown from subtest s'... 2596 more characters
at assertSnapshot (/Users/runner/work/node/node/node/test/common/assertSnapshot.js:173:12)
at async spawnAndAssert (/Users/runner/work/node/node/node/test/common/assertSnapshot.js:208:3)
at async file:///Users/runner/work/node/node/node/test/test-runner/test-output-spec-reporter.mjs:7:1 {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '✔ sync expect fail (method) (*ms) # EXPECTED FAILURE\n' +
'✔ sync expect fail (options) (*ms) # EXPECTED FAILURE\n' +
'✔ async expect fail (method) (*ms) # EXPECTED FAILURE\n' +
'✔ async expect fail (options) (*ms) # EXPECTED FAILURE\n' +
'✔ sync todo with expect fail (*ms) # TODO\n' +
'﹣ sync skip expect fail (*ms) # SKIP\n' +
'✔ sync pass todo (*ms) # TODO\n' +
'✔ sync pass todo with message (*ms) # this is a passing todo\n' +
'⚠ sync fail todo (*ms) # TODO\n' +
'⚠ sync fail todo with message (*ms) # this is a failing todo\n' +
'﹣ sync skip pass (*ms) # SKIP\n' +
'﹣ sync skip pass with message (*ms) # this is skipped\n' +
'✔ sync pass (*ms)\n' +
'ℹ this test should pass\n' +
'✖ sync throw fail (*ms)\n' +
'﹣ async skip pass (*ms) # SKIP\n' +
'✔ async pass (*ms)\n' +
'✖ async throw fail (*ms)\n' +
'﹣ async skip fail (*ms) # SKIP\n' +
'✖ async assertion fail (*ms)\n' +
'✔ resolve pass (*ms)\n' +
'✖ reject fail (*ms)\n' +
'✔ unhandled rejection - passes but warns (*ms)\n' +
'✔ async unhandled rejection - passes but warns (*ms)\n' +
'✔ immediate throw - passes but warns (*ms)\n' +
'✔ immediate reject - passes but warns (*ms)\n' +
'✔ immediate resolve pass (*ms)\n' +
'▶ subtest sync throw fail\n' +
' ✖ +sync throw fail (*ms)\n' +
'
|
|
Test:
test/test-runner/test-output-junit-reporter.mjs#L0
--- stderr ---
node:internal/modules/run_main:107
triggerUncaughtException(
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
... Skipped lines
'<?xml version="1.0" encoding="utf-8"?>\n' +
'<testsuites>\n' +
'\t<testcase name="sync expect fail (method)" time="*" classname="test" file="*"/>\n' +
'\t<testcase name="sync expect fail (options)" time="*" classname="test" file="*"/>\n' +
'\t<testcase name="async expect fail (method)" time="*" classname="test" file="*"/>\n' +
...
' at <node-internal-frames>\n' +
+ " at async Test.processPendingSubtests (node:internal/test_runner/test:960:7) { generatedMessage: true, code: 'ERR_ASSERTION', actual: true, expected: false, operator: 'strictEqual', diff: 'simple' }\n" +
- ' at <node-internal-frames> {\n' +
- ' generatedMessage: true,\n' +
- " code: 'ERR_ASSERTION',\n" +
- ' actual: true,\n' +
- ' expected: false,\n' +
- " operator: 'strictEqual',\n" +
- " diff: 'simple'\n" +
- ' }\n' +
'}\n' +
'\t\t</failure>\n' +
'\t</testcase>\n' +
'\t<testcase name="resolve pass" time="*" classname="test" file="*"/>\n' +
'\t<testcase name="reject fail" time="*" classname="test" file="*" failure="rejected from reject fail">\n' +
...
'\t</testcase>\n' +
+ '\t<testcase name="functionAndOptions'... 14966 more characters
- '\t<testcase name="functionAndOptions" time="*" classname="te'... 14976 more characters
at assertSnapshot (/Users/runner/work/node/node/node/test/common/assertSnapshot.js:173:12)
at async spawnAndAssert (/Users/runner/work/node/node/node/test/common/assertSnapshot.js:208:3)
at async file:///Users/runner/work/node/node/node/test/test-runner/test-output-junit-reporter.mjs:8:1 {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '<?xml version="1.0" encoding="utf-8"?>\n' +
'<testsuites>\n' +
'\t<testcase name="sync expect fail (method)" time="*" classname="test" file="*"/>\n' +
'\t<testcase name="sync expect fail (options)" time="*" classname="test" file="*"/>\n' +
'\t<testcase name="async expect fail (method)" time="*" classname="test" file="*"/>\n' +
'\t<testcase name="async expect fail (options)" time="*" classname="test" file="*"/>\n' +
'\t<testcase name="sync todo with expect fail" time="*" classname="test" file="*">\n' +
'\t\t<skipped type="todo" message="true"/>\n' +
'\t</testcase>\n' +
'\t<testcase name="sync skip expect fail" time="*" classname="test" file="*">\n' +
'\t\t<skipped type="skipped" message="true"/>\n' +
'\t</testcase>\n' +
'\t<testcase name="sync pass todo" time="*" classname="test" file="*">\n' +
'\t\t<skipped type="todo" message="true"/>\n' +
'\t</testcase>\n' +
'\t<testcase name="sync pass todo with message" time="*" classname="test" file="*">\n' +
'\t\t<skipped type="todo" message="this is a passing todo"/>\n' +
'\t</testcase>\n' +
'\t<testcase name="sync fail todo" time="*" classname="test" file="*" failure="thrown from sync fail todo">\n' +
'\t\t<skipped type="todo" message="true"/>\n' +
'\t\t<failure type="testCodeFailure" message="thrown from sync fail todo">\n' +
'[Error [ERR_TEST_FAILURE]: thrown from sync fail todo] {\n' +
" code: 'ERR_TEST_FAILURE',\n" +
" failureType: 'testCodeFailure',\n" +
' cause: Error: thrown from sync fail todo\n' +
' at TestContext.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:42:9)\n' +
' at <node-internal-frames>\n' +
'}\n' +
'\t\t</failure>\n' +
'\t</testcase>\n' +
'\t<testcase name="sync fail todo with message" time="*" classname="test" file="*" failure="thrown from sync fail todo with message">\n' +
'\t\t<skipped type="todo" message="this is a failing todo"/>\n' +
'\t\t<failure type="testCodeFailure" message="thrown from sync fail todo with message">\n' +
'[Error [ERR_TEST_FAILURE]: thrown from sync fail todo with message] {\n' +
" code: 'ERR_TEST_FAILURE',\n" +
" failu
|
|
Test:
test/test-runner/test-output-dot-reporter.mjs#L0
--- stderr ---
node:internal/modules/run_main:107
triggerUncaughtException(
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
... Skipped lines
'........XX...X..XXX.\n' +
'X.....XXX...........\n' +
'.X.........X...XXX.X\n' +
'X.....XXXXXXX...XXXX\n' +
'X\n' +
...
' at <node-internal-frames>\n' +
+ " at async Test.processPendingSubtests (node:internal/test_runner/test:960:7) { generatedMessage: true, code: 'ERR_ASSERTION', actual: true, expected: false, operator: 'strictEqual', diff: 'simple' }\n" +
- ' at <node-internal-frames> {\n' +
- ' generatedMessage: true,\n' +
- " code: 'ERR_ASSERTION',\n" +
- ' actual: true,\n' +
- ' expected: false,\n' +
- " operator: 'strictEqual',\n" +
- " diff: 'simple'\n" +
- ' }\n' +
'✖ reject fail (*ms)\n' +
' Error: rejected from reject fail\n' +
' at TestContext.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:93:25)\n' +
' at <node-internal-frames>\n' +
'✖ +sync throw fail (*ms)\n' +
...
' Error [ERR_TEST_FAILURE]: callback invoked multiple times\n' +
+ " at Immediate.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:283:5) { code: 'ERR_TEST_FAILURE', failureType: 'multipleCallbackInvocations', cause: 'callback invoked multiple times' }\n" +
- ' at Immediate.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:283:5) {\n' +
- " code: 'ERR_TEST_FAILURE',\n" +
- " failureType: 'multipleCallbackInvocations',\n" +
- " cause: 'callback invoked multiple times'\n" +
- ' }\n' +
'✖ callback async throw (*ms)\n' +
' Error: thrown from callback async throw\n' +
' at Immediate.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:289:11)\n' +
' at <node-internal-frames>\n' +
'✖ custom inspect symbol fail (*ms)\n' +
...
' }\n' +
+ " at TestContext.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:425:12) { generatedMessage: true, code: 'ERR_ASSERTION', actual: [Object], expected: [Object], operator: 'deepEqual', diff: 'simple' }\n" +
- ' at TestContext.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:425:12) {\n' +
- ' generatedMessage: true,\n' +
- " code: 'ERR_ASSERTION',\n" +
- ' actual: [Object],\n' +
- ' expected: [Object],\n' +
- " operator: 'deepEqual',\n" +
- " diff: 'simple'\n" +
- ' }\n' +
'✖ invalid subtest fail (*ms)\n' +
" 'test could not be started because its parent finished'\n"
at assertSnapshot (/Users/runner/work/node/node/node/test/common/assertSnapshot.js:173:12)
at async spawnAndAssert (/Users/runner/work/node/node/node/test/common/assertSnapshot.js:208:3)
at async file:///Users/runner/work/node/node/node/test/test-runner/test-output-dot-reporter.mjs:7:1 {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '........XX...X..XXX.\n' +
'X.....XXX...........\n' +
'.X.........X...XXX.X\n' +
'X.....XXXXXXX...XXXX\n' +
'X\n' +
'\n' +
'Failed tests:\n' +
'\n' +
'⚠ sync fail todo (*ms) # TODO\n' +
' Error: thrown from sync fail todo\n' +
' at TestContext.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:42:9)\n' +
' at <node-internal-frames>\n' +
'⚠ sync fail todo with message (*ms) # this is a failing todo\n' +
' Error: thrown from sync fail todo with message\n' +
' at TestContext.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:47:9)\n' +
' at <node-internal-frames>\n' +
'✖ sync throw fail (*ms)\n' +
' Error: thrown from sync throw fail\n' +
' at TestContext.<anonymous> (<project-root>/test/fixtures/test-runner/output/output.js:63:9)\n' +
' at <node-internal-frames>\n' +
'✖ async throw fail (*ms)\n' +
' Error: thrown from async throw fail\n' +
' at TestContext.<anonymous> (<proje
|
|
Test:
test/test-runner/test-output-assertion-color-tty.mjs#L0
--- stderr ---
node:internal/modules/run_main:107
triggerUncaughtException(
^
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
+ actual - expected
... Skipped lines
'[31m✖ failing assertion [90m(*ms)[39m[39m\n' +
'[34mℹ tests 1[39m\n' +
'[34mℹ suites 0[39m\n' +
'[34mℹ pass 0[39m\n' +
'[34mℹ fail 1[39m\n' +
...
" [39m'[39m[32m![39m[39mH[39m[39me[39m[39ml[39m[39ml[39m[39mo[39m[39m [39m[39mW[39m[39mo[39m[39mr[39m[39ml[39m[39md[39m[31m![39m[39m'[39m\n" +
+ " ] { generatedMessage: [33mtrue[39m, code: [32m'ERR_ASSERTION'[39m, actual: [32m'!Hello World'[39m, expected: [32m'Hello World!'[39m, operator: [32m'strictEqual'[39m, diff: [32m'simple'[39m }\n"
- ' ] {\n' +
- ' generatedMessage: [33mtrue[39m,\n' +
- " code: [32m'ERR_ASSERTION'[39m,\n" +
- " actual: [32m'!Hello World'[39m,\n" +
- " expected: [32m'Hello World!'[39m,\n" +
- " operator: [32m'strictEqual'[39m,\n" +
- " diff: [32m'simple'[39m\n" +
- ' }\n'
at assertSnapshot (/Users/runner/work/node/node/node/test/common/assertSnapshot.js:173:12)
at async spawnAndAssert (/Users/runner/work/node/node/node/test/common/assertSnapshot.js:208:3)
at async file:///Users/runner/work/node/node/node/test/test-runner/test-output-assertion-color-tty.mjs:13:1 {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '[31m✖ failing assertion [90m(*ms)[39m[39m\n' +
'[34mℹ tests 1[39m\n' +
'[34mℹ suites 0[39m\n' +
'[34mℹ pass 0[39m\n' +
'[34mℹ fail 1[39m\n' +
'[34mℹ cancelled 0[39m\n' +
'[34mℹ skipped 0[39m\n' +
'[34mℹ todo 0[39m\n' +
'[34mℹ duration_ms *[39m\n' +
'\n' +
'[31m✖ failing tests:[39m\n' +
'\n' +
'test at test/fixtures/test-runner/output/assertion-color-tty.mjs:4:1\n' +
'[31m✖ failing assertion [90m(*ms)[39m[39m\n' +
' [AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\n' +
' [32mactual[39m [31mexpected[39m\n' +
'\n' +
" [39m'[39m[32m![39m[39mH[39m[39me[39m[39ml[39m[39ml[39m[39mo[39m[39m [39m[39mW[39m[39mo[39m[39mr[39m[39ml[39m[39md[39m[31m![39m[39m'[39m\n" +
" ] { generatedMessage: [33mtrue[39m, code: [32m'ERR_ASSERTION'[39m, actual: [32m'!Hello World'[39m, expected: [32m'Hello World!'[39m, operator: [32m'strictEqual'[39m, diff: [32m'simple'[39m }\n",
expected: '[31m✖ failing assertion [90m(*ms)[39m[39m\n' +
'[34mℹ tests 1[39m\n' +
'[34mℹ suites 0[39m\n' +
'[34mℹ pass 0[39m\n' +
'[34mℹ fail 1[39m\n' +
'[34mℹ cancelled 0[39m\n' +
'[34mℹ skipped 0[39m\n' +
'[34mℹ todo 0[39m\n' +
'[34mℹ duration_ms *[39m\n' +
'\n' +
'[31m✖ failing tests:[39m\n' +
'\n' +
'test at test/fixtures/test-runner/output/assertion-color-tty.mjs:4:1\n' +
'[31m✖ failing assertion [90m(*ms)[39m[39m\n' +
' [AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:\n' +
' [32mactual[39m [31mexpected[39m\n' +
'\n' +
" [39m'[39m[32m![39m[39mH[39m[39me[39m[39ml[39m[39ml[39m[39mo[39m[39m [39m[39mW[39m[39mo[39m[39mr[39m[39ml[39m[39md[39m[31m![39m[39m'[39m\n" +
' ] {\n' +
' generatedMessage: [33mtrue[39m,\n' +
" code: [32m'ERR_ASSERTION'[39m,\n" +
" actual: [32m'!Hello World'[39m,\n" +
" expected: [32m'Hello World!'[39m,\n" +
" operator: [32m'strictEqual'[39m,\n" +
" diff: [32m'simple'[39m\n" +
' }\n',
operator: 'strictEqual',
diff: 'simple'
}
Node.js v27.0.0-pre
Command: out/Release/node --expose-internals /Users/runner/work/node/node/node/test/test-runner/test-output-assertion-color-tty.mjs
|
|
Post Set up sccache
73% - 3655 hits, 1381 misses, 0 errors
|
background
wait
wait-all
cancel
parallel
Loading