Add option to print current spec name to jasmine

This commit is contained in:
phoenixeliot 2016-07-18 10:56:25 -07:00
parent 1d616cd92a
commit d7209d784e

View file

@ -49,6 +49,15 @@ console.error = function() {
console.log.apply(console, arguments); console.log.apply(console, arguments);
}; };
if (process.argv.indexOf('--with-test-names') > -1) {
jasmine.getEnv().addReporter({
specStarted: function(result){
// Printing weirdly so pass/fail indicator is on the same line as the test name
process.stdout.write('\n' + result.fullName);
}
})
}
var initialized = false; var initialized = false;
beforeEach(function(done) { beforeEach(function(done) {
if (initialized) { if (initialized) {