diff --git a/docs/integration-tests.md b/docs/integration-tests.md index 85e02aacef..c3da474abd 100644 --- a/docs/integration-tests.md +++ b/docs/integration-tests.md @@ -34,6 +34,14 @@ To run a single test by its name, use the `--test-name-pattern` flag: npm run test:e2e -- --test-name-pattern "reads a file" ``` +### Deflaking a test + +Before adding a **new** integration test, you should test it at least 5 times with the deflake script to make sure that it is not flaky. + +```bash +npm run deflake -- --runs=5 --command="npm run test:e2e -- --test-name-pattern ''" +``` + ### Running all tests To run the entire suite of integration tests, use the following command: diff --git a/scripts/deflake.js b/scripts/deflake.js index a093408365..08eace5b43 100644 --- a/scripts/deflake.js +++ b/scripts/deflake.js @@ -57,7 +57,7 @@ async function main() { }) .option('runs', { type: 'number', - default: 50, + default: 5, description: 'The number of runs to perform', }).argv;