Skip to content

Commit 7b8552a

Browse files
committed
also add a note about electron unit test runner
1 parent d288521 commit 7b8552a

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

test/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,19 @@ This folder contains the various test runners for VSCode. Please refer to the do
99
* `ui`: our suite of manual UI tests
1010

1111

12-
### Browser Unit Tests
12+
13+
### Unit Tests (Electron-runner)
14+
15+
```
16+
./scripts/test.[sh|bat]
17+
```
18+
19+
All unit tests are run inside a electron-browser environment which access to DOM and Nodejs api. This is the closest to the enviroment in which VS Code itself ships. Notes:
20+
21+
- use the `--debug` to see an electron window with dev tools which allows for debugging
22+
- to run only a subset of tests use the `--run` or `--glob` options
23+
24+
### Unit Tests (Browser-runner)
1325

1426
```
1527
yarn test-browser --browser webkit --browser chromium

test/unit/electron/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const defaultReporterName = process.platform === 'win32' ? 'list' : 'spec';
1717
const optimist = require('optimist')
1818
.describe('grep', 'only run tests matching <pattern>').alias('grep', 'g').alias('grep', 'f').string('grep')
1919
.describe('run', 'only run tests from <file>').string('run')
20-
.describe('runGlob', 'only run tests matching <file_pattern>').alias('runGlob', 'runGrep').string('runGlob')
20+
.describe('runGlob', 'only run tests matching <file_pattern>').alias('runGlob', 'glob').alias('runGlob', 'runGrep').string('runGlob')
2121
.describe('build', 'run with build output (out-build)').boolean('build')
2222
.describe('coverage', 'generate coverage report').boolean('coverage')
2323
.describe('debug', 'open dev tools, keep window open, reuse app data').string('debug')

0 commit comments

Comments
 (0)