How to get output of console.log when using node:test?

342 Views Asked by At

I am using node:test test runner.

The test simply prints to stdout using console.log.

console.log({ foo: JSON.stringify(choices) });

I expect the output to include the result of JSON.stringify, but instead I am getting:

node --test --test-reporter=spec src/createChat.test.ts
ℹ {
ℹ foo:
ℹ }
0

There are 0 best solutions below