This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
Run tests only when they are detected on the disk. Do not run tests when the test file pattern is invalid. Require to set KNAPSACK_PRO_TEST_FILE_PATTERN #11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
When a user has test files in a non-standard directory then Knapsack Pro can't find test files so the empty array of tests is sent to Knapsack Pro API Queue. API returns an error so Knapsack Pro switches to Fallback Mode and runs the whole test suite on a single node because the empty list of tests was set for Jest CLI which means Jest should run all tests. It leads to all parallel CI nodes to run the whole test suite.
Solution
KNAPSACK_PRO_TEST_FILE_PATTERN
being required.Thanks to this a user who has a test suite in a non-standard directory won't be accidentally running tests in Fallback Mode. Users will see meaningful error with tips on what to do to fix the problem.
Other changes
@knapsack-pro/core
to 1.6.1 https://github.com/KnapsackPro/knapsack-pro-core-js/blob/master/CHANGELOG.md#v161-2019-11-04