diff options
author | Mark Stacey <markjstacey@gmail.com> | 2019-06-25 02:40:49 +0800 |
---|---|---|
committer | Mark Stacey <markjstacey@gmail.com> | 2019-06-25 04:11:50 +0800 |
commit | 225eaa65ccaa94d2bd44b69bed256c42e973fcab (patch) | |
tree | dc37307db81973158c8201bfcc4c8fab4b32e74f | |
parent | 7d8ab3a8eff131c2d3c0c444ba373b167b2d8b77 (diff) | |
download | tangerine-wallet-browser-225eaa65ccaa94d2bd44b69bed256c42e973fcab.tar.gz tangerine-wallet-browser-225eaa65ccaa94d2bd44b69bed256c42e973fcab.tar.zst tangerine-wallet-browser-225eaa65ccaa94d2bd44b69bed256c42e973fcab.zip |
Fix 'watch' npm script
The `watch` npm script did not work - it must have gone unused for some
time. The following changes were required for it to work:
* Use the `--watch` flag, rather than the `watch` command (which appears
to not exist)
* Set the `METAMASK_ENV` environment variable to "test"
* Include the tests in the `ui` directory
* require the `test/setup.js` file before running the tests
The reporter was also changed to `min`, which is generally recommended
for use with the `--watch` flag.
-rw-r--r-- | package.json | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package.json b/package.json index c9c3bd633..84c50ee31 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "lint": "eslint .", "lint:fix": "eslint . --fix", "mozilla-lint": "addons-linter dist/firefox", - "watch": "mocha watch --recursive \"test/unit/**/*.js\"", + "watch": "cross-env METAMASK_ENV=test mocha --watch --require test/setup.js --reporter min --recursive \"test/unit/**/*.js\" \"ui/app/**/*.test.js\"", "disc": "gulp disc --debug", "announce": "node development/announcer.js", "version:bump": "node development/run-version-bump.js", |