Skip to content

Commit

Permalink
feat(test): add nyc coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Sep 1, 2019
1 parent 0ab6de7 commit e627a51
Show file tree
Hide file tree
Showing 4 changed files with 462 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -95,7 +95,7 @@ test-examples: ## run medium (feature) tests

test-bundle: ## run small (unit) tests
test-bundle: build-bundle
$(NODE_BIN)/mocha $(TARGET_PATH)/test.js
$(NODE_BIN)/nyc --reporter=lcov --reporter=text-summary --report-dir="$(TARGET_PATH)/coverage" --exclude-after-remap $(NODE_BIN)/mocha $(TARGET_PATH)/test.js

test-rules: ## validate the rules directory
test-rules: build-bundle
Expand Down Expand Up @@ -159,4 +159,4 @@ run-stream: ## validate stdin and write it to stdout, errors to stderr
--format yaml \
--rules $(ROOT_PATH)/rules/kubernetes.yml \
--source - \
--tag kubernetes
--tag kubernetes
4 changes: 4 additions & 0 deletions config/mocha.json
@@ -0,0 +1,4 @@
{
"reporter": ["json"],
"ui": ["bdd"]
}
7 changes: 6 additions & 1 deletion package.json
Expand Up @@ -32,6 +32,7 @@
"author": "ssube",
"license": "MIT",
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^0.1.3",
"@types/bunyan": "1.8.6",
"@types/chai": "4.2.0",
"@types/deep-diff": "1.0.0",
Expand All @@ -50,6 +51,7 @@
"lodash": "4.17.15",
"mocha": "6.2.0",
"noicejs": "2.5.2",
"nyc": "^14.1.1",
"rollup": "1.20.3",
"rollup-plugin-commonjs": "10.1.0",
"rollup-plugin-json": "4.0.0",
Expand All @@ -64,5 +66,8 @@
"typescript": "3.6.2",
"yargs": "14.0.0"
},
"dependencies": {}
"dependencies": {},
"nyc": {
"extends": "@istanbuljs/nyc-config-typescript"
}
}

0 comments on commit e627a51

Please sign in to comment.