Skip to content

Commit

Permalink
Fix 'watch' npm script
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Gudahtt committed Jun 24, 2019
1 parent 7d8ab3a commit 225eaa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 225eaa6

Please sign in to comment.