-
Notifications
You must be signed in to change notification settings - Fork 16
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
Ava watch does not work with pre-compile option #33
Comments
Could you run AVA with |
The test isn't rerun. |
I don't think I've noticed this before myself. Does it work when you rewrite from This line looks suspect: Line 119 in b6bc757
The log output gives an absolute path, but that logic assumes a relative path. If we can figure out what configuration does work then we can make sure alternative configurations also work, or fail to run the tests with a useful error, instead of having the watcher not working. |
no, same result. |
Bummer! This sounds like a bug, though I haven't encountered it myself. If you could share a reproduction that would make it easier to debug. |
The repository is public https://github.com/StarpTech/graphql-registry. Just run |
I think I found the bug. As you already mentioned the conditions in Line 119 in b6bc757
return !rewritePaths.find(([from]) => filePath.startsWith(from)); After that the test is rerun but then I run into
|
Friendly ping @novemberborn. Any idea? I'd work on it. |
Hi @StarpTech sorry for the delay. I think that function is supposed to detect and ignore changes to files in the |
I'd be grateful for any help. |
Would be good to log the values passed to |
I bumped into the same issue and I mostly agree with @StarpTech on the cause when the compilation step is enabled, you want to monitor changes on the .ts files and to do so, the current check on the rewritePaths must be reversed. You want to trigger on changes in the "from" paths and ignore changes in the "to" paths. on the other hand, if the compilation is done externally, you don't want to trigger the test then the .ts file change, because the compiled output probably isn't ready yet. In this case the current check on the rewritePaths is correct: it ignores the "from" paths and trigger for changes in the "to" path. Also, the current behaviour does not match with what's described in the main README file. |
Thanks for the clarification @alebianco. Would appreciate some PRs to fix. |
@novemberborn let me know if I have to do something about those pending checks |
Please provide details about:
Ava watch mode with this package.
ava --watch
If I change a source file or test file the runner is not restarted. If I do the same with
ts-node/register
it works.Ava runner should rerun on file change.
ava: 3.15.0
The text was updated successfully, but these errors were encountered: