vscode/test/unit
2020-02-07 15:06:29 +01:00
..
browser test - remove unsupported options, fix bad file warning 2020-02-07 15:06:29 +01:00
electron Move coverage.js into test/unit 2020-02-07 12:37:26 +01:00
node Move coverage.js into test/unit 2020-02-07 12:37:26 +01:00
assert.js Move assert.js into test/unit 2020-02-07 12:32:06 +01:00
coverage.js Move coverage.js into test/unit 2020-02-07 12:37:26 +01:00
README.md Move more files to test/unit 2020-02-07 12:21:30 +01:00

Unit Tests

Run (inside Electron)

The best way to run the unit tests is from the terminal. To make development changes to unit tests you need to be running yarn watch. See Development Workflow for more details. From the vscode folder run:

OS X and Linux

./scripts/test.sh

Windows

scripts\test

Run (inside browser)

You can run tests inside a browser instance too:

OS X and Linux

node test/unit/browser/index.js

Windows

node test\unit\browser\index.js

Run (with node)

yarn run mocha --run src/vs/editor/test/browser/controller/cursor.test.ts

Debug

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

Coverage

The following command will create a coverage folder at the root of the workspace:

OS X and Linux

./scripts/test.sh --coverage

Windows

scripts\test --coverage