Update Mocha and NYC test configuration (#102)

- Add TSNode to get proper coverage on TS files
- Tell Mocha to look for tests in subdirectories
- Configure NYC to look for coverage on all src files
- Move `source-map-support` to being a dev dependency
- Ensure NYC keeps us at 100% code coverage
This commit is contained in:
Hans Bergren
2020-02-05 13:19:47 -05:00
parent e199878ea4
commit adaa75d180
6 changed files with 65 additions and 29 deletions

View File

@@ -0,0 +1,19 @@
module.exports = {
extension: ['.js', '.ts'],
exclude: [
'**/*.d.ts',
'*.js',
'test/**/*',
],
// Assert we remain at 100% code coverage
'check-coverage': true,
'branches': 100,
'lines': 100,
'functions': 100,
'statements': 100,
// Required to get coverage reported on every file, including those that aren't tested
all: true,
}