forked from gronke/file-entry-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEAT: Add an option to not prune non visited keys. Closes #2
- Loading branch information
Showing
5 changed files
with
117 additions
and
60 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,40 @@ | ||
"use strict"; | ||
|
||
// we run mocha manually otherwise istanbul coverage won't work | ||
// run `npm test --coverage` to generate coverage report | ||
|
||
var Mocha = require('mocha'); | ||
|
||
|
||
// --- | ||
|
||
var Mocha = require( 'mocha' ); | ||
|
||
|
||
// to set these options run the test script like: | ||
// > BAIL=true GREP=array_expression REPORTER=dot npm test | ||
var opts = { | ||
ui: 'bdd', | ||
bail: !!(process.env.BAIL), | ||
reporter:( process.env.REPORTER || 'spec'), | ||
reporter: (process.env.REPORTER || 'spec'), | ||
grep: process.env.GREP, | ||
colors: true | ||
}; | ||
|
||
// we use the dot reporter on travis since it works better | ||
if (process.env.TRAVIS) { | ||
if ( process.env.TRAVIS ) { | ||
opts.reporter = 'dot'; | ||
} | ||
|
||
var m = new Mocha(opts); | ||
var m = new Mocha( opts ); | ||
|
||
if (process.env.INVERT) { | ||
if ( process.env.INVERT ) { | ||
m.invert(); | ||
} | ||
|
||
var expand = require('glob-expand'); | ||
expand('test/specs/**/*.js').forEach(function (file){ | ||
m.addFile(file); | ||
}); | ||
var expand = require( 'glob-expand' ); | ||
expand( 'test/specs/**/*.js' ).forEach( function ( file ) { | ||
m.addFile( file ); | ||
} ); | ||
|
||
m.run(function(err) { | ||
m.run( function ( err ) { | ||
var exitCode = err ? 1 : 0; | ||
if (err) console.log('failed tests: ' + err); | ||
process.exit(exitCode); | ||
}); | ||
if ( err ) { | ||
console.log( 'failed tests: ' + err ); | ||
} | ||
|
||
process.exit( exitCode ); // eslint-disable-line | ||
} ); |
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