How to use the utils function from mocha

Find comprehensive JavaScript mocha.utils code examples handpicked from public code repositorys.

5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
 */


process.removeListener = function(e, fn){
  if ('uncaughtException' == e) {
    global.onerror = function() {};
    var i = Mocha.utils.indexOf(uncaughtExceptionHandlers, fn);
    if (i != -1) { uncaughtExceptionHandlers.splice(i, 1); }
  }
};

fork icon2
star icon2
watch icon0

+ 27 other calls in file

5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370


mocha.run = function(fn){
  var options = mocha.options;
  mocha.globals('location');


  var query = Mocha.utils.parseQuery(window.location.search || '');
  if (query.grep) mocha.grep(query.grep);
  if (query.invert) mocha.invert();


  return Mocha.prototype.run.call(mocha, function(){
fork icon0
star icon0
watch icon1

+ 3 other calls in file