Skip to content

Commit

Permalink
Add TEST_DEBUG env var option for test.sh, to enable node 6 debugger (b…
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewML authored and panagosg7 committed Jan 17, 2017
1 parent af074bb commit 92a0635
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -115,6 +115,12 @@ Use the `TEST_GREP` variable to run a subset of tests by name:
$ TEST_GREP=transformation make test
```

To enable the node debugger added in v6.3.0, set the `TEST_DEBUG` environment variable:

```sh
$ TEST_DEBUG=true make test
```

To test the code coverage, use:

```sh
Expand Down
8 changes: 7 additions & 1 deletion scripts/test.sh
Expand Up @@ -5,4 +5,10 @@ if [ -z "$TEST_GREP" ]; then
TEST_GREP=""
fi

node node_modules/mocha/bin/_mocha `scripts/_get-test-directories.sh` --opts test/mocha.opts --grep "$TEST_GREP"
node="node"

if [ "$TEST_DEBUG" ]; then
node="node --inspect --debug-brk"
fi

$node node_modules/mocha/bin/_mocha `scripts/_get-test-directories.sh` --opts test/mocha.opts --grep "$TEST_GREP"

0 comments on commit 92a0635

Please sign in to comment.