Skip to content

Instantly share code, notes, and snippets.

@ryanpedersen42
Last active July 2, 2020 16:51
Show Gist options
  • Save ryanpedersen42/3b38e42200222084a351cec91a8f18e3 to your computer and use it in GitHub Desktop.
Save ryanpedersen42/3b38e42200222084a351cec91a8f18e3 to your computer and use it in GitHub Desktop.
Example command to split tests
# 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