Lines Matching refs:hook
4638 this.on('hook end', function(hook){ self.checkGlobals(hook); }); argument
4810 Runner.prototype.failHook = function(hook, err){ argument
4811 this.fail(hook, err);
4825 Runner.prototype.hook = function(name, fn){ method in Runner
4832 var hook = hooks[i];
4833 if (!hook) return fn();
4834 self.currentRunnable = hook;
4836 hook.ctx.currentTest = self.test;
4838 self.emit('hook', hook);
4840 hook.on('error', function(err){
4841 self.failHook(hook, err);
4844 hook.run(function(err){
4845 hook.removeAllListeners('error');
4846 var testError = hook.error();
4852 self.failHook(hook, err);
4858 self.emit('hook end', hook);
4859 delete hook.ctx.currentTest;
4891 self.hook(name, function(err){
5119 self.hook('afterAll', function(){
5125 this.hook('beforeAll', function(err){
5468 var hook = new Hook(title, fn);
5469 hook.parent = this;
5470 hook.timeout(this.timeout());
5471 hook.enableTimeouts(this.enableTimeouts());
5472 hook.slow(this.slow());
5473 hook.ctx = this.ctx;
5474 this._beforeAll.push(hook);
5475 this.emit('beforeAll', hook);
5495 var hook = new Hook(title, fn);
5496 hook.parent = this;
5497 hook.timeout(this.timeout());
5498 hook.enableTimeouts(this.enableTimeouts());
5499 hook.slow(this.slow());
5500 hook.ctx = this.ctx;
5501 this._afterAll.push(hook);
5502 this.emit('afterAll', hook);
5522 var hook = new Hook(title, fn);
5523 hook.parent = this;
5524 hook.timeout(this.timeout());
5525 hook.enableTimeouts(this.enableTimeouts());
5526 hook.slow(this.slow());
5527 hook.ctx = this.ctx;
5528 this._beforeEach.push(hook);
5529 this.emit('beforeEach', hook);
5549 var hook = new Hook(title, fn);
5550 hook.parent = this;
5551 hook.timeout(this.timeout());
5552 hook.enableTimeouts(this.enableTimeouts());
5553 hook.slow(this.slow());
5554 hook.ctx = this.ctx;
5555 this._afterEach.push(hook);
5556 this.emit('afterEach', hook);