-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Make test.only
work correctly with --concurrency
flag.
#923
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
Comments
I think the code in the watcher is manageable. We need to take a stab at implementing it for I really like the predictability of |
I use it a lot with test suits of multiple files. It would be an inconvenience having to manually specify the path to the test file.
I think we should try first. |
test.only
work correctly with --concurrency
flag.
I have a question @jamestalmage, you said:
That is not the behavior I experience in watch mode. If I modify a source file then it only reruns the corresponding test file, but if I'm working on adding tests or fixing tests on any change it re-runs the whole test suite. This is the AVA config I'm using:
Am I missing something? |
Have a look at the Debugging section in the watch mode recipe. AVA probably picked up on file changes it could not trace back to a specific test, so it reruns all. |
ok so I ran in DEBUG mode, and it looks like you're right, I see this: is there any way to see which sources AVA could not trace back to tests? there are certainly parts of our codebase that do not yet (or might never) have tests and we use external modules inside some of our test files also (could that be the problem?) Without being able to use the |
@arosenthal-r7 it should have output the files that changed. This is off-topic for this issue though, I'm in Gitter at the moment, perhaps chat there? https://gitter.im/avajs/ava |
Closing in favor of #1472. |
Right now, if you use
test.only
, it affects your entire test suite.Add a
test.only
to one file, and it suppresses tests from being run in other files.Unfortunately, this currently doesn't work when using the
--concurrency
flag. It also introduces quite a bit of extra code into our smart watcher.While I think the original behavior is probably ideal, I wonder if it's not worth reducing it's power a bit, just to make our implementations easier.
Specifically, if we made
test.only
suppress only other tests in the same file, we could make a sensible concurrency the default behavior (right now the default behavior is unlimited concurrency). Thus far, we have had a very positive response on the--concurrency
flag, and I think making it the default behavior would probably benefit most users.test.only
to you?A few things to remember:
test.only
to a test will cause only that file to run.test.only
currently behaves, but it's definitely a little less convenient.The text was updated successfully, but these errors were encountered: