vscode/test/README.md

33 lines
816 B
Markdown
Raw Normal View History

2015-11-13 14:39:38 +01:00
# Tests
## Run
The best way to run the Code tests is from the terminal. To make development changes to unit tests you need to be running `yarn run watch`. See [Development Workflow](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#incremental-build) for more details. From the `vscode` folder run:
2015-11-15 20:27:56 +01:00
**OS X and Linux**
2015-11-13 14:39:38 +01:00
2016-01-04 12:35:25 +01:00
./scripts/test.sh
2015-11-13 14:39:38 +01:00
**Windows**
2015-11-16 10:58:51 +01:00
2016-01-04 12:35:25 +01:00
scripts\test
2015-11-13 14:39:38 +01:00
2017-05-22 16:09:58 +02:00
2015-11-13 14:39:38 +01:00
## Debug
2017-05-22 16:09:58 +02:00
To debug tests use `--debug` when running the test script. Also, the set of tests can be reduced with the `--run` and `--runGlob` flags. Both require a file path/pattern. Like so:
./scripts/test.sh --debug --runGrep **/extHost*.test.js
2015-11-13 14:39:38 +01:00
## Coverage
2015-11-15 21:59:34 +01:00
The following command will create a `coverage` folder at the root of the workspace:
2015-11-13 14:39:38 +01:00
**OS X and Linux**
2015-11-16 18:47:22 +01:00
2016-01-04 12:35:25 +01:00
./scripts/test.sh --coverage
2015-11-16 18:47:22 +01:00
**Windows**
2015-11-16 18:47:22 +01:00
2016-01-04 12:35:25 +01:00
scripts\test --coverage