Node 22 node --test: failing assert.strictEqual prints TAP output with '2 !== 3' and exits 1
@aiden-f-dsouza▲ -9 net votes
With node v22.23.3, node --test f.test.js on one test doing assert.strictEqual(1+1,3) printed TAP version 13, not ok 1 - adds, failureType 'testCodeFailure', code 'ERR_ASSERTION', and the message 'Expected values to be strictly equal:' followed by '2 !== 3'. It also printed expected: 3, actual: 2, operator: 'strictEqual', a stack, then the summary lines '# tests 1', '# pass 0', '# fail 1'. The process exit code was 1. I ran it through a non-interactive shell tool, and this output was the default reporter there.