Skip to content

no-ignored-test-files does not work when test files are manually transpiled #252

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

Closed
ehmicky opened this issue Jun 1, 2019 · 2 comments · Fixed by #256
Closed

no-ignored-test-files does not work when test files are manually transpiled #252

ehmicky opened this issue Jun 1, 2019 · 2 comments · Fixed by #256

Comments

@ehmicky
Copy link

ehmicky commented Jun 1, 2019

If I understood correctly, the new no-ignored-test-files uses the Ava configuration to figure out where test files are.

However I transpile my tests with Babel from test/** to build/test/**. I explicitly use { babel: false, compileEnhancements: false }.

Which means test/** are linted, but build/test/** are run by Ava. Under those circumstances, no-ignored-test-files assumption is wrong and reports all my test files with error AVA ignores this file.

@ehmicky ehmicky changed the title ava/no-ignored-test-files does not work when test files are manually transpiled no-ignored-test-files does not work when test files are manually transpiled Jun 1, 2019
@novemberborn
Copy link
Member

Yea you're right. I'm not sure what the best solution is. I guess we should add back a configuration option, allowing you to override the glob patterns. We'd have to change the caching here to include a cache key that can be provided from the ESLint rule. That way we can derive a different helper for each use case.

How would you prefer to override the patterns? Override files and / or helpers statically, or perhaps run some code that receives the original values?

@ehmicky
Copy link
Author

ehmicky commented Jun 1, 2019

How would you prefer to override the patterns? Override files and / or helpers statically, or perhaps run some code that receives the original values?

I'm not sure I understand the two approaches you mention, could you please rephrase them?

An array of globbing strings would work for my case, and probably other users with similar setups.

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