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

Exclusive Tests running different test suite with same title #2226

Closed
andrewmunro opened this issue Apr 27, 2016 · 2 comments
Closed

Exclusive Tests running different test suite with same title #2226

andrewmunro opened this issue Apr 27, 2016 · 2 comments

Comments

@andrewmunro
Copy link

Minor issue but it caused me a headache to pin down and see what was happening.

I have two test files with the same suite name:

//MyComponent.test.js
describe("MyComponent", function()....

//MyComponent.test.jsx
describe("MyComponent", function()....

After putting a .only on the first suite, it was running tests in the second one:

//MyComponent.test.js
describe.only("MyComponent", function()....

//THESE TESTS RUN INSTEAD!
//MyComponent.test.jsx
describe("MyComponent", function()....

The obvious fix was to change the suite titles so they are unique, but I feel like this should either be fixed or well documented somewhere.

@scags9876
Copy link

+1

Just encountered the same

@boneskull
Copy link
Contributor

let's just say only doesn't work the way you think it does (it uses pattern matching). this has been addressed in many issues already

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants