mocha 10.8.2 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -57,7 +57,7 @@ module.exports = function (suites, context, mocha) {
57
57
  * @param {Function} fn
58
58
  */
59
59
  before: function (name, fn) {
60
- suites[0].beforeAll(name, fn);
60
+ return suites[0].beforeAll(name, fn);
61
61
  },
62
62
 
63
63
  /**
@@ -67,7 +67,7 @@ module.exports = function (suites, context, mocha) {
67
67
  * @param {Function} fn
68
68
  */
69
69
  after: function (name, fn) {
70
- suites[0].afterAll(name, fn);
70
+ return suites[0].afterAll(name, fn);
71
71
  },
72
72
 
73
73
  /**
@@ -77,7 +77,7 @@ module.exports = function (suites, context, mocha) {
77
77
  * @param {Function} fn
78
78
  */
79
79
  beforeEach: function (name, fn) {
80
- suites[0].beforeEach(name, fn);
80
+ return suites[0].beforeEach(name, fn);
81
81
  },
82
82
 
83
83
  /**
@@ -87,7 +87,7 @@ module.exports = function (suites, context, mocha) {
87
87
  * @param {Function} fn
88
88
  */
89
89
  afterEach: function (name, fn) {
90
- suites[0].afterEach(name, fn);
90
+ return suites[0].afterEach(name, fn);
91
91
  },
92
92
 
93
93
  suite: {
package/lib/suite.js CHANGED
@@ -257,7 +257,7 @@ Suite.prototype.beforeAll = function (title, fn) {
257
257
  var hook = this._createHook(title, fn);
258
258
  this._beforeAll.push(hook);
259
259
  this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_ALL, hook);
260
- return this;
260
+ return hook;
261
261
  };
262
262
 
263
263
  /**
@@ -281,7 +281,7 @@ Suite.prototype.afterAll = function (title, fn) {
281
281
  var hook = this._createHook(title, fn);
282
282
  this._afterAll.push(hook);
283
283
  this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_ALL, hook);
284
- return this;
284
+ return hook;
285
285
  };
286
286
 
287
287
  /**
@@ -305,7 +305,7 @@ Suite.prototype.beforeEach = function (title, fn) {
305
305
  var hook = this._createHook(title, fn);
306
306
  this._beforeEach.push(hook);
307
307
  this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_EACH, hook);
308
- return this;
308
+ return hook;
309
309
  };
310
310
 
311
311
  /**
@@ -329,7 +329,7 @@ Suite.prototype.afterEach = function (title, fn) {
329
329
  var hook = this._createHook(title, fn);
330
330
  this._afterEach.push(hook);
331
331
  this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_EACH, hook);
332
- return this;
332
+ return hook;
333
333
  };
334
334
 
335
335
  /**
package/mocha.js CHANGED
@@ -1,4 +1,4 @@
1
- // mocha@10.8.2 in javascript ES2018
1
+ // mocha@11.0.0 in javascript ES2018
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -13771,7 +13771,7 @@
13771
13771
  var hook = this._createHook(title, fn);
13772
13772
  this._beforeAll.push(hook);
13773
13773
  this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_ALL, hook);
13774
- return this;
13774
+ return hook;
13775
13775
  };
13776
13776
 
13777
13777
  /**
@@ -13795,7 +13795,7 @@
13795
13795
  var hook = this._createHook(title, fn);
13796
13796
  this._afterAll.push(hook);
13797
13797
  this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_ALL, hook);
13798
- return this;
13798
+ return hook;
13799
13799
  };
13800
13800
 
13801
13801
  /**
@@ -13819,7 +13819,7 @@
13819
13819
  var hook = this._createHook(title, fn);
13820
13820
  this._beforeEach.push(hook);
13821
13821
  this.emit(constants.EVENT_SUITE_ADD_HOOK_BEFORE_EACH, hook);
13822
- return this;
13822
+ return hook;
13823
13823
  };
13824
13824
 
13825
13825
  /**
@@ -13843,7 +13843,7 @@
13843
13843
  var hook = this._createHook(title, fn);
13844
13844
  this._afterEach.push(hook);
13845
13845
  this.emit(constants.EVENT_SUITE_ADD_HOOK_AFTER_EACH, hook);
13846
- return this;
13846
+ return hook;
13847
13847
  };
13848
13848
 
13849
13849
  /**
@@ -18593,7 +18593,7 @@
18593
18593
  * @param {Function} fn
18594
18594
  */
18595
18595
  before: function (name, fn) {
18596
- suites[0].beforeAll(name, fn);
18596
+ return suites[0].beforeAll(name, fn);
18597
18597
  },
18598
18598
 
18599
18599
  /**
@@ -18603,7 +18603,7 @@
18603
18603
  * @param {Function} fn
18604
18604
  */
18605
18605
  after: function (name, fn) {
18606
- suites[0].afterAll(name, fn);
18606
+ return suites[0].afterAll(name, fn);
18607
18607
  },
18608
18608
 
18609
18609
  /**
@@ -18613,7 +18613,7 @@
18613
18613
  * @param {Function} fn
18614
18614
  */
18615
18615
  beforeEach: function (name, fn) {
18616
- suites[0].beforeEach(name, fn);
18616
+ return suites[0].beforeEach(name, fn);
18617
18617
  },
18618
18618
 
18619
18619
  /**
@@ -18623,7 +18623,7 @@
18623
18623
  * @param {Function} fn
18624
18624
  */
18625
18625
  afterEach: function (name, fn) {
18626
- suites[0].afterEach(name, fn);
18626
+ return suites[0].afterEach(name, fn);
18627
18627
  },
18628
18628
 
18629
18629
  suite: {
@@ -19201,7 +19201,7 @@
19201
19201
  };
19202
19202
 
19203
19203
  var name = "mocha";
19204
- var version = "10.8.2";
19204
+ var version = "11.0.0";
19205
19205
  var homepage = "https://mochajs.org/";
19206
19206
  var notifyLogo = "https://ibin.co/4QuRuGjXvl36.png";
19207
19207
  var require$$17 = {