Last active
July 2, 2020 16:51
-
-
Save ryanpedersen42/3b38e42200222084a351cec91a8f18e3 to your computer and use it in GitHub Desktop.
Example command to split tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Step 1: Use the CircleCI CLI to split the tests with a globbing pattern to find test.js and exclude node_modules | |
# Step 2: Pipe list of tests in and split by timing data | |
# Step 3: Run tests as usual with the split test files being fed to the test runner | |
- run: | |
name: Test application w/ timing data | |
command: | | |
TEST=$(circleci tests glob **/{*test.js,!node_modules} | circleci tests split --split-by=timings) | |
yarn test $TEST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment