Created
October 31, 2015 20:33
-
-
Save GuyMograbi/e16772e4443cb7f690bc to your computer and use it in GitHub Desktop.
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
var logger = require('log4js').getLogger('normalize'); | |
var chalk = require('chalk'); | |
chalk.enabled = true; | |
beforeEach(function(){ | |
console.log( chalk.bold.blue('currently running :: ' + jasmine.getEnv().currentSpec.getFullName())); | |
// define new matchers | |
var toBePresent = { | |
toBePresent: function (msg) { | |
var me = this; | |
return this.actual.isPresent().then(function () { | |
return true; | |
}, function (e) { | |
me.message = function(){ | |
return msg || ( 'element not present. error is :: ' + e.toString() ); | |
}; | |
return false; | |
}); | |
} | |
}; | |
this.addMatchers(toBePresent); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment