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

Support .skipIf().concurrent #36

Closed
beorn opened this issue May 20, 2022 · 2 comments
Closed

Support .skipIf().concurrent #36

beorn opened this issue May 20, 2022 · 2 comments
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@beorn
Copy link

beorn commented May 20, 2022

Describe the bug

Tests that use Vitest's .skipIf (and I presume .runIf) show up failed because "Test result not found.".

To Reproduce

Try for example:

const isDev = true

describe.skipIf(isDev)("suite 1", () => {
  test("skipped if isDev", () => {
    expect(true).toBe(true)
  })
})

describe("suite 2", () => {
  test.skipIf(isDev)("also skipped if isDev", () => {
    expect(true).toBe(true)
  })
})

Expected behavior

Tests like this should not automatically err out.

Ideally they should be ignored or included depending on the result of the condition (perhaps assume that a missing test result means that it was skipped?) - or in the worst case perhaps just treat them like skipped tests?

Screenshots

Screen Shot 2022-05-19 at 19 17 29

Environment

  • OS: macOS
  • VSCode version: 1.67.2 (Universal)
  • Vitest version: 0.12.6
  • Vitest plugin version: v0.2.3
@beorn beorn added the p3-minor-bug An edge case that only affects very specific usage (priority) label May 20, 2022
@beorn beorn changed the title Support .skipIf() and Support .skipIf() and .runIf() May 20, 2022
@zxch3n zxch3n changed the title Support .skipIf() and .runIf() Support .skipIf().concurrent May 20, 2022
zxch3n added a commit that referenced this issue May 20, 2022
@zxch3n
Copy link
Member

zxch3n commented May 20, 2022

Fixed in v0.2.10. You can switch to the pre-release version to test whether the issue persists

@zxch3n zxch3n closed this as completed May 20, 2022
@beorn
Copy link
Author

beorn commented May 20, 2022

Confirms that it works - thanks! 😁

@github-actions github-actions bot locked and limited conversation to collaborators Feb 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

2 participants