Skip to content
New issue

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

test runner runs all tests above the one which is marked as .only #10850

Open
Zombobot1 opened this issue May 5, 2024 · 0 comments
Open

test runner runs all tests above the one which is marked as .only #10850

Zombobot1 opened this issue May 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Zombobot1
Copy link

What version of Bun is running?

1.1.7+b0b7db5c0

What platform is your computer?

Darwin 23.4.0 arm64 arm

What steps can reproduce the bug?

// test.ts
import { describe, it, expect } from 'bun:test'

describe('describe', () => { // without describe it doesn't work as expected either
  // same for test instead of it
  it('test 1', () => {
    expect(1).toBe(1) // also runs
  })

  it.only('test 2', () => {
    expect(2).toBe(2)
  })
})

bun test ./test.ts

✓ describe > test 1 [0.03ms]
✓ describe > test 2 [0.01ms]

What is the expected behavior?

test runner doesn't run tests which are not marked as only

What do you see instead?

test runner runs all tests above the one which is marked as only

Additional information

No response

@Zombobot1 Zombobot1 added the bug Something isn't working label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant