diff --git a/test/README.md b/test/README.md index 12426a418a2..81bc2862419 100644 --- a/test/README.md +++ b/test/README.md @@ -9,7 +9,19 @@ This folder contains the various test runners for VSCode. Please refer to the do * `ui`: our suite of manual UI tests -### Browser Unit Tests + +### Unit Tests (Electron-runner) + +``` +./scripts/test.[sh|bat] +``` + +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: + +- use the `--debug` to see an electron window with dev tools which allows for debugging +- to run only a subset of tests use the `--run` or `--glob` options + +### Unit Tests (Browser-runner) ``` yarn test-browser --browser webkit --browser chromium diff --git a/test/unit/electron/index.js b/test/unit/electron/index.js index 386515dc414..2230b37df9f 100644 --- a/test/unit/electron/index.js +++ b/test/unit/electron/index.js @@ -17,7 +17,7 @@ const defaultReporterName = process.platform === 'win32' ? 'list' : 'spec'; const optimist = require('optimist') .describe('grep', 'only run tests matching ').alias('grep', 'g').alias('grep', 'f').string('grep') .describe('run', 'only run tests from ').string('run') - .describe('runGlob', 'only run tests matching ').alias('runGlob', 'runGrep').string('runGlob') + .describe('runGlob', 'only run tests matching ').alias('runGlob', 'glob').alias('runGlob', 'runGrep').string('runGlob') .describe('build', 'run with build output (out-build)').boolean('build') .describe('coverage', 'generate coverage report').boolean('coverage') .describe('debug', 'open dev tools, keep window open, reuse app data').string('debug')