From f720584d9088d3b00818f3be4bd8c8f93855f863 Mon Sep 17 00:00:00 2001 From: Jeff McAffer Date: Sun, 13 Nov 2016 15:34:50 -0800 Subject: [PATCH] Add istanbul code coverage --- .gitignore | 1 + .vscode/launch.json | 25 +++++++++++++++++++++++-- package.json | 1 + 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6a8752d..d236995 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules/ typings/ npm-debug.log +coverage/ diff --git a/.vscode/launch.json b/.vscode/launch.json index 2d53f5d..0e1ada4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,13 +2,34 @@ "version": "0.2.0", "configurations": [ { - "name": "Run mocha", + "name": "Mocha", "type": "node", "request": "launch", "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", "stopOnEntry": false, "args": [ - "test/*.js" + "${workspace}/test/*.js" + ], + "cwd": "${workspaceRoot}", + "runtimeExecutable": null, + "runtimeArgs": [ + "--nolazy" + ], + "env": { + "NODE_ENV": "development" + }, + "console": "internalConsole" + }, + { + "name": "Coverage", + "type": "node", + "request": "launch", + "program": "${workspaceRoot}/node_modules/istanbul/lib/cli.js", + "stopOnEntry": false, + "args": [ + "cover", + "${workspaceRoot}/node_modules/mocha/bin/_mocha", + "${workspaceRoot}/test/*.js" ], "cwd": "${workspaceRoot}", "runtimeExecutable": null, diff --git a/package.json b/package.json index 1d19b92..2afa486 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "chai": "^3.5.0", "grunt": "^1.0.1", "grunt-mocha-test": "^0.13.2", + "istanbul": "^0.4.5", "mocha": "^3.1.2" } }