fix(core): test change should trigger failed test rerun
fix #3687
Run & review this pull request in StackBlitz Codeflow.
Deploy Preview for fastidious-cascaron-4ded94 canceled.
| Name | Link |
|---|---|
| Latest commit | 0d017c1ff805b84f6dc58a77de2573952fad410a |
| Latest deploy log | https://app.netlify.com/sites/fastidious-cascaron-4ded94/deploys/64b543429c07560008f0d776 |
- The implementation doesn't seem to consider the filter enabled by pressing
f? This PR should only affect that use case.
Maybe I misunderstood you guys? I thought that as long as the test content is modified, if there is a failed test case, it will automatically rerun.
I seem to understand that only after pressing f, if the content of the test file is modified, the failed test will be automatically run, is it?
The issue contains two bugs:
- When user has activated "Run only failed test"-filter in watch mode by pressing
f, this filter does not preserve if files are modified- The "Run only failed test"-filter runs all test cases inside test files. It should run only failed test cases. Now it's only filtering the files.
If I didn't understand the error, it means that if a test file has test cases that fail, after pressing f, only the failed suite in the test file is re-run instead of the entire test file and all cases are re-run? (If so, filter test cases in a test file, I don't know how to do it, can you give me a hint? Thanks.)
And if the content of the file is modified, the failed test will not be filtered, and the original operation logic can be followed.
(If so, filter test cases in a test file, I don't know how to do it, can you give me a hint? Thanks.)
I'm not 100% sure, but the changes should be made somewhere around packages/runner I think.
Sorry, I can't seem to find any relevant instructions in the official documentation. Maybe I'm missing something. 🤔
@sheremet-va Can you give me a little hint? Thanks!
@sheremet-va Can you give me a little hint? Thanks!
I'm not sure, but I think you can set configOverride.testNamePattern to filter tests (this is what vscode does) - maybe we should improve this somehow internally 🤷🏻