Skip to content

Commit

Permalink
fix: address standard nits
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Coe committed Sep 13, 2016
1 parent 1448a89 commit 936c9c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ var md5hex = require('md5-hex')
var findCacheDir = require('find-cache-dir')
var js = require('default-require-extensions/js')
var testExclude = require('test-exclude')
var yargs = require('yargs')

var ProcessInfo
try {
Expand Down
2 changes: 1 addition & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var Yargs = require('yargs/yargs')
// * package.json.
// * .nycrc (coming soon)
function Config (argv, cwd) {
var cwd = cwd || process.env.NYC_CWD || process.cwd()
cwd = cwd || process.env.NYC_CWD || process.cwd()
var pkgPath = pkgUp.sync(cwd)

if (pkgPath) {
Expand Down
12 changes: 6 additions & 6 deletions test/src/nyc-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ describe('nyc', function () {

it('exclude overrides include', function () {
var nyc = new NYC(Config([
'--include=foo.js',
'--include=test.js',
'--exclude=**/node_modules/**',
'--exclude=test/**',
'--exclude=test{,-*}.js'
], '/cwd/'))
'--include=foo.js',
'--include=test.js',
'--exclude=**/node_modules/**',
'--exclude=test/**',
'--exclude=test{,-*}.js'
], '/cwd/'))

nyc.exclude.shouldInstrument('/cwd/foo.js', 'foo.js').should.equal(true)
nyc.exclude.shouldInstrument('/cwd/test.js', 'test.js').should.equal(false)
Expand Down

0 comments on commit 936c9c2

Please sign in to comment.