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
v19.7.0
Darwin Moshes-MBP.localdomain 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000 arm64
test_runner
run a test file:
const { test, describe, beforeEach } = require('node:test'); describe('tests', () => { beforeEach((t) => { console.log("beforeEach") }); test('1', () => { console.log("test1") }); });
always
each test should run once.
test is reported once but it is actually ran twice
beforeEach test1 beforeEach test1 TAP version 13 # Subtest: tests # Subtest: 1 ok 1 - 1 --- duration_ms: 2.669708 ... 1..1 ok 1 - tests --- duration_ms: 2.015625 ... 1..1 # tests 1 # pass 1 # fail 0 # cancelled 0 # skipped 0 # todo 0 # duration_ms 6.29675
No response
The text was updated successfully, but these errors were encountered:
In node v18.x it will report 2 tests passed instead of 1. I think this has been fixed but I didn't find any issue / PR linked to it 🤔
Sorry, something went wrong.
completed via #46888
Successfully merging a pull request may close this issue.
Version
v19.7.0
Platform
Darwin Moshes-MBP.localdomain 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:01 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T6000 arm64
Subsystem
test_runner
What steps will reproduce the bug?
run a test file:
How often does it reproduce? Is there a required condition?
always
What is the expected behavior?
each test should run once.
What do you see instead?
test is reported once but it is actually ran twice
Additional information
No response
The text was updated successfully, but these errors were encountered: