From a4832c304e29dedf5e0ba3be52610acd15c24a3e Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Wed, 5 Oct 2016 22:21:42 -0700 Subject: [PATCH] unify testing docs for all platforms --- docs/development/build-instructions-linux.md | 12 +----- docs/development/build-instructions-osx.md | 29 +------------ .../development/build-instructions-windows.md | 22 +--------- docs/development/build-system-overview.md | 41 +++++++++++++++++++ 4 files changed, 44 insertions(+), 60 deletions(-) diff --git a/docs/development/build-instructions-linux.md b/docs/development/build-instructions-linux.md index e6f9b3382666..376b2c8c2d72 100644 --- a/docs/development/build-instructions-linux.md +++ b/docs/development/build-instructions-linux.md @@ -121,17 +121,7 @@ $ sudo ln -s /usr/lib/libncurses.so.5 /usr/lib/libtinfo.so.5 ## Tests -Test your changes conform to the project coding style using: - -```bash -$ npm run lint -``` - -Test functionality using: - -```bash -$ ./script/test.py -``` +See [Build System Overview: Tests](docs/development/build-system-overview.md#tests) ## Advanced topics diff --git a/docs/development/build-instructions-osx.md b/docs/development/build-instructions-osx.md index 0cf7a40d415a..87e66669009f 100644 --- a/docs/development/build-instructions-osx.md +++ b/docs/development/build-instructions-osx.md @@ -61,31 +61,4 @@ $ npm run clean ## Tests -Test your changes conform to the project coding style using: - -```bash -$ npm run lint -``` - -Test functionality using: - -```bash -$ npm test -``` - -You can make the test suite run faster by isolating the specific test or block -you're currently working on using Mocha's -[exclusive tests](https://mochajs.org/#exclusive-tests) feature: - -```js -describe.only('some feature', function () { - // ... only tests in this block will be run -}) -``` - -Alternatively, you can use mocha's `grep` option to only run tests matching the -given regular expression pattern: - -```sh -npm test -- --grep child_process -``` +See [Build System Overview: Tests](docs/development/build-system-overview.md#tests) diff --git a/docs/development/build-instructions-windows.md b/docs/development/build-instructions-windows.md index d66ca18867d2..2aab866a7f35 100644 --- a/docs/development/build-instructions-windows.md +++ b/docs/development/build-instructions-windows.md @@ -87,27 +87,7 @@ $ npm run clean ## Tests -Test your changes conform to the project coding style using: - -```powershell -$ python script\cpplint.py -``` - -Test functionality using: - -```powershell -$ python script\test.py -``` - -Tests that include native modules (e.g. `runas`) can't be executed with the -debug build (see [#2558](https://github.com/electron/electron/issues/2558) for -details), but they will work with the release build. - -To run the tests with the release build use: - -```powershell -$ python script\test.py -R -``` +See [Build System Overview: Tests](docs/development/build-system-overview.md#tests) ## Troubleshooting diff --git a/docs/development/build-system-overview.md b/docs/development/build-system-overview.md index 4336092b7213..4a755dddeeb6 100644 --- a/docs/development/build-system-overview.md +++ b/docs/development/build-system-overview.md @@ -71,3 +71,44 @@ to generate one target at a time as stated above. This only affects developers, if you are just building Electron for rebranding you are not affected. + +## Tests + +Test your changes conform to the project coding style using: + +```bash +$ npm run lint +``` + +Test functionality using: + +```bash +$ npm test +``` + +You can make the test suite run faster by isolating the specific test or block +you're currently working on using Mocha's +[exclusive tests](https://mochajs.org/#exclusive-tests) feature: + +```js +describe.only('some feature', function () { + // ... only tests in this block will be run +}) +``` + +Alternatively, you can use mocha's `grep` option to only run tests matching the +given regular expression pattern: + +```sh +$ npm test -- --grep child_process +``` + +Tests that include native modules (e.g. `runas`) can't be executed with the +debug build (see [#2558](https://github.com/electron/electron/issues/2558) for +details), but they will work with the release build. + +To run the tests with the release build use: + +```bash +$ npm test -- -R +```