Skip to content

Instantly share code, notes, and snippets.

@GuyMograbi
Created October 31, 2015 20:33
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 GuyMograbi/e16772e4443cb7f690bc to your computer and use it in GitHub Desktop.
Save GuyMograbi/e16772e4443cb7f690bc to your computer and use it in GitHub Desktop.
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