Skip to content

Commit

Permalink
docs: add "Debug Tests"
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Aug 11, 2016
1 parent 73171c9 commit b9e1e03
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,20 @@ A detailed explanation can be found in this [document](https://docs.google.com/d

Don't edit wiki directly. Instead, edit files in the `/docs`.

`/docs` is synced to wiki using git subtree merge when `next` release is marked as `latest` and available for all users.
`/docs` is synced to wiki using git subtree merge when `next` release is marked as `latest` and available for all users.

# Debug Tests

Only IntelliJ Platform IDEs (IntelliJ IDEA, WebStorm) support debug. [Forked version of AVA](https://github.com/avajs/ava/pull/874) is used. Please see [AVA debug in the WebStorm](https://www.youtube.com/watch?v=C75UwuZXI98&feature=youtu.be).

Use one of the shared run configurations as a template and:

* Set `Node interpreter` to NodeJS 7. Yes — NodeJS 7 is required to debug. Download [nightly build](https://nodejs.org/download/nightly/).
* Set `Node parameters` to `--inspect`.
* Set `Application Parameters` to `--match="test name" relative-test-file-name` if you want to debug particular test. E.g.
```
--match="extraResources - one-package" test/out/globTest.js
```
* Set `Environment Variables`:
* `NODE_PATH` to `.`.
* Optionally, `TEST_APP_TMP_DIR` to some directory (e.g. `/tmp/electron-builder-test`) to inspect output if test uses temporary directory (only if `--match` is used). Specified directory will be used instead of random temporary directory and *cleared* on each run.

0 comments on commit b9e1e03

Please sign in to comment.