FAQ / @knapsack-pro/jest / Knapsack Pro Jest specific questions

How to use Jest config file with Knapsack Pro Jest?

You can pass Jest config file path with --config option in command-line options. It can be directly passed to @knapsack-pro/jest. See example:

$(npm bin)/knapsack-pro-jest --config=jest.config.e2e.js

You can find other Jest CLI options here.

Note if you set a test file pattern or list of tests to run in Jest config file with options like those below then it will be ignored!

testPathPattern
testPathIgnorePatterns
testMatch
...etc

@knapsack-pro/jest cannot read the test pattern or ignore pattern from Jest config file. You must provide list of tests to run with KNAPSACK_PRO_TEST_FILE_PATTERN and ignored tests with KNAPSACK_PRO_TEST_FILE_EXCLUDE_PATTERN environment variable.

Start using Knapsack Pro

Sign up and speed up your tests.