What's the difference between '--watchAll=false' and 'CI=true'? What's the difference between '--watchAll=false' and 'CI=true'? reactjs reactjs

What's the difference between '--watchAll=false' and 'CI=true'?


Your CI environment will likely set the CI environment variable to true without you doing anything.

So for your CI you shouldn't really need to set either watchAll=false or CI=true but if you do want to set something manually rather use CI=true.

At least one difference between the 2 is that watchAll=false (and if CI=false) will still create Jest snapshots if they don't exist. You won't want this in a CI environment. Your tests will pass even if the snapshots change.