Last active
December 8, 2017 18:20
-
-
Save StickyCube/45ea4e92d24c5b7a3a852c5e627c5613 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"include": [ | |
"foo.js" | |
], | |
"reporter": "text-lcov" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (a, b) { | |
return a + b; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "test-nyc", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"dependencies": { | |
"mocha": "4.0.1", | |
"nyc": "11.3.0" | |
}, | |
"scripts": { | |
"test": "mocha spec.js", | |
"test:coverage": "nyc npm t" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const foo = require('./foo.js'); | |
const assert = require('assert'); | |
it('Passes', () => { | |
let actual = foo(1, 1); | |
let expected = 2; | |
assert.equal(actual, expected); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment