From ab7aaf8d2f3a85533b9b7c25bf93ec2cf055308e Mon Sep 17 00:00:00 2001 From: Charles Gagnon Date: Wed, 21 Oct 2020 10:43:50 -0700 Subject: [PATCH] Include instructions on filtering test runs (#13016) --- test/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/README.md b/test/README.md index 9503e90863..5805de167c 100644 --- a/test/README.md +++ b/test/README.md @@ -20,6 +20,23 @@ Run these with the script `./scripts/test-extensions-unit.[bat|sh]` Code coverage is enabled by default. Reports can be found in the coverage folder at the root of the folder for each extension that ran. +To run just the tests from a specific extension run + +`node ./scripts/test-extensions-unit.js [extensionName]` + +e.g. + +`node ./scripts/test-extensions-unit.js notebook` + +will run all tests from the notebook extension. + +In addition the extensions also support the [grep Mocha option](https://mochajs.org/api/mocha#grep). Set the `ADS_TEST_GREP` environment variable to a string that will be used to match the full test title. + +e.g. + +`$ENV:ADS_TEST_GREP="my test name"` + +and then running one of the above test commands will run only the tests which contain the phrase `my test name` in the title. ### Integration tests