Skip to content

[node:test] skip option of test function doesn't seem working #19412

@kt3k

Description

@kt3k

What version of Bun is running?

1.2.11

What platform is your computer?

Darwin 23.6.0 arm64 arm

What steps can reproduce the bug?

Create a test file:

// a_test.mjs
import test from "node:test";
test("foo", { skip: true }, () => {});

and run it:

$ bun test a_test.mjs
bun test v1.2.11 (cb6abd21)

a_test.mjs:
✓ foo [0.32ms]

 1 pass
 0 fail
Ran 1 tests across 1 files. [54.00ms]

What is the expected behavior?

The test case is skipped

What do you see instead?

The test case is executed

Additional information

Node.js skips the test case:

$ node a_test.mjs 
﹣ foo (0.640916ms) # SKIP
ℹ tests 1
ℹ suites 0
ℹ pass 0
ℹ fail 0
ℹ cancelled 0
ℹ skipped 1
ℹ todo 0
ℹ duration_ms 5.840834

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbun:testSomething related to the `bun test` runnernode.jsCompatibility with Node.js APIs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions