Skip to content

Instantly share code, notes, and snippets.

@davidcornu
Created January 23, 2013 21:47
Show Gist options
  • Save davidcornu/4614035 to your computer and use it in GitHub Desktop.
Save davidcornu/4614035 to your computer and use it in GitHub Desktop.
var Mocha = require('mocha');
var path = require('path');
var testFile = path.resolve(__dirname, './test_file.js');
var set1 = new Mocha;
set1.addFile(testFile);
var set2 = new Mocha;
set2.addFile(testFile);
set1.run(function(failures1){
set2.run(function(failures2){
process.exit(failures1 && failures2);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment