Marry Jest with CircleCI with some bonuses.
1 min readApr 9, 2018
Problem: I want to run Jest tests on CircleCI. I have got many tests and I am on the free tier of CircleCI. Why is it a problem? Because Jest runs tests in parallel and I got “Out of memory” from CircleCI.
Solution: Add maxWorkers parameter to Jest.
-- --maxWorkers=4
Bonus #1: To get code coverage report from Jest
-- --coverage
Bonus #2: To fail Jest run when the first test fails
-- --bail
Bonus #3: To flush AWS Gateway API authorizer
aws apigateway flush-stage-authorizers-cache --rest-api-id ${apiId} --stage-name ${stage}