-
Notifications
You must be signed in to change notification settings - Fork 466
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
getByRole
fails when running under vitest
with --no-isolate --no-file-parallelism
#1337
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
Reopening after updating the reproduction |
Hi @Janpot, thanks for opening this. Also, the reproduction actually passed for me: I honestly don't think there's an issue with testing library here or anything we can do to make this work better for your use case. |
Uh oh! @MatanBobi, the image you shared is missing helpful alt text. Check #1337 (comment). Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image. Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs. |
@testing-library/dom
version: 10.4.0Relevant code or config:
Have two files with following content
What you did:
Run
pnpm test run
=> worksRun
pnpm test run -- --no-isolate --no-file-parallelism
=> one of the tests fail.What happened:
One of the tests fails, it can't seem to locate the button, yet it's there when calling
screen.debug()
Reproduction:
Stackblitz with reproduction: https://stackblitz.com/edit/vitest-dev-vitest-9xcyxz?file=test%2Fbar.test.ts
You can run
pnpm test run
andpnpm test run -- --no-isolate --no-file-parallelism
to see the bug in action.Problem description:
Migrating from mocha to vitest, trying to reach similar performance by disabling isolation
Suggested solution:
The text was updated successfully, but these errors were encountered: