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 name uniqueness works differently depending on pattern passed to the CLI. #2462

Closed
juanjoDiaz opened this issue Apr 18, 2020 · 2 comments

Comments

@juanjoDiaz
Copy link

I have 3 files with the exact same tests with the exact same names.
Each file, however, tests a different implementation.
For the sake of example, you can think of 2 files with the same tests once testing lodash and other testing underscore.

If I run ava test/{test1,test2,test2}.js my tests pass just fine.
If I run ava test/*.js my tests fail with error: Duplicate test title: <my test title>

I guess that it has to do with the isolation between files and processes. But how you define the pattern shouldn't have any impact on this. Or should it?

@novemberborn
Copy link
Member

Uniqueness should be per file. Any chance there’s a file you’ve overlooked?

@juanjoDiaz
Copy link
Author

Indeed.

It turned out that I had a file importing two other test files and creating the duplicate.

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

No branches or pull requests

2 participants