Skip to content

Instantly share code, notes, and snippets.

@dominictarr
Created November 20, 2010 05:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dominictarr/707645 to your computer and use it in GitHub Desktop.
Save dominictarr/707645 to your computer and use it in GitHub Desktop.
break async_testing.runFile
//async_testing.runfile.asynct
exports ['does not call onSuiteDone twice'] = function (test){
var file = 'async_testing/test/test-stderr'
require('async_testing').runFile(file,{onSuiteDone:suiteDone})
function suiteDone (status,report){
console.log("suiteDone - " + status + "'" + file + "'")
console.log(report.stderr)
test.finish()
}
}
/*
if there isn't a second test, this process will exit before suiteError is called again.
*/
exports ['does not call onSuiteDone twice2'] = function (test){
require('async_testing').runFile('async_testing/test/test-all_passing',{onSuiteDone:suiteDone})
function suiteDone (status,report){
test.finish()
}
}
if (module == require.main) {
// return require('../lib/async_testing').run(process.ARGV);
}
module.exports = {
'test A': function(test) {
test.ok(true);
test.finish();
},
'test B': function(test) {
test.ok(true);
test.finish();
},
'test C': function(test) {
test.ok(true);
test.finish();
},
'test D': function(test) {
test.ok(true);
test.finish();
}
};
exports.stderr = function (){
require('sys') //generate some stderr
console.error('standard error....')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment