Closed inverted-capital closed 10 months ago
Seems something is taking too long to run, and yet running vitest in watch mode has no issues:
[Info] console.log: [Info] Finished executing 2 affected test(s) in 281 millisecond(s) [Info] console.log: [Info] console.log: [Info] Finished executing 2 affected test(s) in 406 millisecond(s) [Error] Some long running code has been detected: one of your tests is taking more than 5000ms to execute. [Error] The last recorded console.log: [Error] Some long running code has been detected: one of your tests is taking more than 5000ms to execute. [Error] The last recorded console.log: [Info] console.log: [Info] console.log: [Info] Finished executing 2 affected test(s) in 406 millisecond(s) [Error] Some long running code has been detected: one of your tests is taking more than 5000ms to execute. [Error] The last recorded console.log: [Error] Some long running code has been detected: one of your tests is taking more than 5000ms to execute. [Error] The last recorded console.log: [Info] console.log: [Info] console.log: [Info] console.log: [Info] Finished executing 2 affected test(s) in 415 millisecond(s) [Error] Some long running code has been detected: one of your tests is taking more than 5000ms to execute. [Error] The last recorded console.log: [Error] Some long running code has been detected: one of your tests is taking more than 5000ms to execute. [Error] The last recorded console.log: [Info] console.log: [Info] console.log: [Info] Finished executing 2 affected test(s) in 397 millisecond(s) [Error] Some long running code has been detected: one of your tests is taking more than 5000ms to execute. [Error] The last recorded console.log:
This is the test file in question: https://github.com/dreamcatcher-tech/artifact/blob/main/src/artifact.test.js
It is interacting with the local filesystem, which might be causing some issues.
It is just strange that it can run fine the first time, but not any subsequent runs 🤷
ok I have fixed it by adding the following to package.json:
"wallaby": {
"workers": {
"restart": true
}
}
but it feels like I shouldn't have to do this, so hopefully this is a valid issue to raise !
thanks again for your product - super helpful tool that I can't live without 👍
Thanks for reporting the issue.
There's been some breaking changes in vitest@1.1.2
that has been released a few hours ago. We will be adding support of this version of vitest soon. In meantime you may use vitest@1.1.1
.
Also, because some of your tests are writing to tmp
, we recommend to exclude the folder in your vitest config for faster test runs.
The support for vitest 1.1.2 has been released in the latest core v1.0.1517.
Issue description or question
When I am working in a source file, changes are detected and the tests rerun after a small delay of about a second (be great if this was shorter but not sure how to change that) - however when I alter the test file, the coverage does not update and the code does not get recognized, as tho wallaby is frozen on the test file that it started with and never updates it.
Also changes to the test file do not trigger a test rerun at all.
Wallaby diagnostics report