We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Looks like for some reason this package swallows errors if the experimental mocking is enabled.
I was setting up a basic test to play around with mocking and made a failing test like this:
import assert from 'node:assert'; import test from 'node:test'; test('greet', async (t) => { t.mock.module('../some-module.js', { namedExports: { greet() { return `Goodbye, World!`; }, }, }); const { greet } = await import('../some-module.js'); assert.equal(greet(), 'Hello, World!'); });
and when I ran it via:
node --test --experimental-test-module-mocks --test-reporter=@voxpelli/node-test-pretty-reporter ./greet.test.js
the only thing it emitted was this:
ℹ tests 1 ℹ suites 0 ℹ pass 0 ℹ fail 1 ℹ cancelled 0 ℹ skipped 0 ℹ todo 0 ℹ duration_ms 214.166458
Running with the default node test reporter shows errors correctly, though.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Looks like for some reason this package swallows errors if the experimental mocking is enabled.
I was setting up a basic test to play around with mocking and made a failing test like this:
and when I ran it via:
the only thing it emitted was this:
Running with the default node test reporter shows errors correctly, though.
The text was updated successfully, but these errors were encountered: