Update Mocha & Istanbul (#68)

We were on a really old version of Mocha, and standard practice for JS
code coverage is to use `nyc` now. This switches our code coverage tool
to `nyc`, and gets us on the latest version of Mocha.

Our code coverage did not appear to be working before either,
now it does.

Additionally, Mocha now supports `.mocharc.js` files which let us have
inline comments for configuration. `.mocha.opts` is deprecated, so I
have switched our Mocha configuration to the new format.

If we had configuration that was equal to the default, I have removed it
This commit is contained in:
Hans Bergren
2020-01-21 15:36:00 -05:00
parent dee3a24739
commit a2280e74e1
4 changed files with 968 additions and 325 deletions

View File

@@ -0,0 +1,8 @@
module.exports = {
opts: false,
slow: 500,
timeout: 5000,
// Check for global variable leaks
"check-leaks": true,
}

View File

@@ -32,8 +32,8 @@
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-mocha": "^6.2.2",
"eslint-plugin-prettier": "^3.1.2",
"istanbul": "~0.3.5",
"mocha": "~2.3.3",
"mocha": "^7.0.0",
"nyc": "^15.0.0",
"prettier": "^1.19.1",
"typescript": "^3.1.3"
},
@@ -41,7 +41,7 @@
"compile": "tsc",
"compile-babel": "babel --optional runtime -d distrib/npm/ src/",
"compile-with-source-maps": "babel --optional runtime -s -t -d distrib/npm/ src/",
"test": "tsc && istanbul test _mocha",
"test": "tsc && nyc mocha",
"lint": "eslint . --ext .ts --fix"
},
"repository": {

View File

@@ -1 +0,0 @@
--reporter spec --timeout 5000 --slow 500 --compilers js:babel/register

File diff suppressed because it is too large Load Diff