chai 5.1.1 → 5.2.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.
@@ -42,14 +42,18 @@ export {expect};
42
42
  */
43
43
  expect.fail = function (actual, expected, message, operator) {
44
44
  if (arguments.length < 2) {
45
- message = actual;
46
- actual = undefined;
45
+ message = actual;
46
+ actual = undefined;
47
47
  }
48
48
 
49
49
  message = message || 'expect.fail()';
50
- throw new AssertionError(message, {
51
- actual: actual
52
- , expected: expected
53
- , operator: operator
54
- }, chai.expect.fail);
50
+ throw new AssertionError(
51
+ message,
52
+ {
53
+ actual: actual,
54
+ expected: expected,
55
+ operator: operator
56
+ },
57
+ chai.expect.fail
58
+ );
55
59
  };
@@ -10,17 +10,19 @@ import {AssertionError} from 'assertion-error';
10
10
  /**
11
11
  * @returns {void}
12
12
  */
13
- function loadShould () {
13
+ function loadShould() {
14
14
  // explicitly define this method as function as to have it's name to include as `ssfi`
15
15
  /**
16
16
  * @returns {Assertion}
17
17
  */
18
18
  function shouldGetter() {
19
- if (this instanceof String
20
- || this instanceof Number
21
- || this instanceof Boolean
22
- || typeof Symbol === 'function' && this instanceof Symbol
23
- || typeof BigInt === 'function' && this instanceof BigInt) {
19
+ if (
20
+ this instanceof String ||
21
+ this instanceof Number ||
22
+ this instanceof Boolean ||
23
+ (typeof Symbol === 'function' && this instanceof Symbol) ||
24
+ (typeof BigInt === 'function' && this instanceof BigInt)
25
+ ) {
24
26
  return new Assertion(this.valueOf(), null, shouldGetter);
25
27
  }
26
28
  return new Assertion(this, null, shouldGetter);
@@ -44,9 +46,9 @@ function loadShould () {
44
46
  }
45
47
  // modify Object.prototype to have `should`
46
48
  Object.defineProperty(Object.prototype, 'should', {
47
- set: shouldSetter
48
- , get: shouldGetter
49
- , configurable: true
49
+ set: shouldSetter,
50
+ get: shouldGetter,
51
+ configurable: true
50
52
  });
51
53
 
52
54
  var should = {};
@@ -74,16 +76,20 @@ function loadShould () {
74
76
  */
75
77
  should.fail = function (actual, expected, message, operator) {
76
78
  if (arguments.length < 2) {
77
- message = actual;
78
- actual = undefined;
79
+ message = actual;
80
+ actual = undefined;
79
81
  }
80
82
 
81
83
  message = message || 'should.fail()';
82
- throw new AssertionError(message, {
83
- actual: actual
84
- , expected: expected
85
- , operator: operator
86
- }, should.fail);
84
+ throw new AssertionError(
85
+ message,
86
+ {
87
+ actual: actual,
88
+ expected: expected,
89
+ operator: operator
90
+ },
91
+ should.fail
92
+ );
87
93
  };
88
94
 
89
95
  /**
@@ -147,10 +153,10 @@ function loadShould () {
147
153
  */
148
154
  should.exist = function (val, msg) {
149
155
  new Assertion(val, msg).to.exist;
150
- }
156
+ };
151
157
 
152
158
  // negation
153
- should.not = {}
159
+ should.not = {};
154
160
 
155
161
  /**
156
162
  * ### .not.equal(actual, expected, [message])
@@ -209,13 +215,13 @@ function loadShould () {
209
215
  */
210
216
  should.not.exist = function (val, msg) {
211
217
  new Assertion(val, msg).to.not.exist;
212
- }
218
+ };
213
219
 
214
220
  should['throw'] = should['Throw'];
215
221
  should.not['throw'] = should.not['Throw'];
216
222
 
217
223
  return should;
218
- };
224
+ }
219
225
 
220
226
  export const should = loadShould;
221
227
  export const Should = loadShould;
@@ -19,23 +19,22 @@ var canSetPrototype = typeof Object.setPrototypeOf === 'function';
19
19
 
20
20
  // Without `Object.setPrototypeOf` support, this module will need to add properties to a function.
21
21
  // However, some of functions' own props are not configurable and should be skipped.
22
- var testFn = function() {};
23
- var excludeNames = Object.getOwnPropertyNames(testFn).filter(function(name) {
22
+ var testFn = function () {};
23
+ var excludeNames = Object.getOwnPropertyNames(testFn).filter(function (name) {
24
24
  var propDesc = Object.getOwnPropertyDescriptor(testFn, name);
25
25
 
26
26
  // Note: PhantomJS 1.x includes `callee` as one of `testFn`'s own properties,
27
27
  // but then returns `undefined` as the property descriptor for `callee`. As a
28
28
  // workaround, we perform an otherwise unnecessary type-check for `propDesc`,
29
29
  // and then filter it out if it's not an object as it should be.
30
- if (typeof propDesc !== 'object')
31
- return true;
30
+ if (typeof propDesc !== 'object') return true;
32
31
 
33
32
  return !propDesc.configurable;
34
33
  });
35
34
 
36
35
  // Cache `Function` properties
37
- var call = Function.prototype.call,
38
- apply = Function.prototype.apply;
36
+ var call = Function.prototype.call,
37
+ apply = Function.prototype.apply;
39
38
 
40
39
  /**
41
40
  * ### .addChainableMethod(ctx, name, method, chainingBehavior)
@@ -67,12 +66,12 @@ var call = Function.prototype.call,
67
66
  */
68
67
  export function addChainableMethod(ctx, name, method, chainingBehavior) {
69
68
  if (typeof chainingBehavior !== 'function') {
70
- chainingBehavior = function () { };
69
+ chainingBehavior = function () {};
71
70
  }
72
71
 
73
72
  var chainableBehavior = {
74
- method: method
75
- , chainingBehavior: chainingBehavior
73
+ method: method,
74
+ chainingBehavior: chainingBehavior
76
75
  };
77
76
 
78
77
  // save the methods so we can overwrite them later, if we need to.
@@ -81,67 +80,67 @@ export function addChainableMethod(ctx, name, method, chainingBehavior) {
81
80
  }
82
81
  ctx.__methods[name] = chainableBehavior;
83
82
 
84
- Object.defineProperty(ctx, name,
85
- { get: function chainableMethodGetter() {
86
- chainableBehavior.chainingBehavior.call(this);
87
-
88
- var chainableMethodWrapper = function () {
89
- // Setting the `ssfi` flag to `chainableMethodWrapper` causes this
90
- // function to be the starting point for removing implementation
91
- // frames from the stack trace of a failed assertion.
92
- //
93
- // However, we only want to use this function as the starting point if
94
- // the `lockSsfi` flag isn't set.
95
- //
96
- // If the `lockSsfi` flag is set, then this assertion is being
97
- // invoked from inside of another assertion. In this case, the `ssfi`
98
- // flag has already been set by the outer assertion.
99
- //
100
- // Note that overwriting a chainable method merely replaces the saved
101
- // methods in `ctx.__methods` instead of completely replacing the
102
- // overwritten assertion. Therefore, an overwriting assertion won't
103
- // set the `ssfi` or `lockSsfi` flags.
104
- if (!flag(this, 'lockSsfi')) {
105
- flag(this, 'ssfi', chainableMethodWrapper);
106
- }
107
-
108
- var result = chainableBehavior.method.apply(this, arguments);
109
- if (result !== undefined) {
110
- return result;
111
- }
112
-
113
- var newAssertion = new Assertion();
114
- transferFlags(this, newAssertion);
115
- return newAssertion;
116
- };
117
-
118
- addLengthGuard(chainableMethodWrapper, name, true);
119
-
120
- // Use `Object.setPrototypeOf` if available
121
- if (canSetPrototype) {
122
- // Inherit all properties from the object by replacing the `Function` prototype
123
- var prototype = Object.create(this);
124
- // Restore the `call` and `apply` methods from `Function`
125
- prototype.call = call;
126
- prototype.apply = apply;
127
- Object.setPrototypeOf(chainableMethodWrapper, prototype);
83
+ Object.defineProperty(ctx, name, {
84
+ get: function chainableMethodGetter() {
85
+ chainableBehavior.chainingBehavior.call(this);
86
+
87
+ var chainableMethodWrapper = function () {
88
+ // Setting the `ssfi` flag to `chainableMethodWrapper` causes this
89
+ // function to be the starting point for removing implementation
90
+ // frames from the stack trace of a failed assertion.
91
+ //
92
+ // However, we only want to use this function as the starting point if
93
+ // the `lockSsfi` flag isn't set.
94
+ //
95
+ // If the `lockSsfi` flag is set, then this assertion is being
96
+ // invoked from inside of another assertion. In this case, the `ssfi`
97
+ // flag has already been set by the outer assertion.
98
+ //
99
+ // Note that overwriting a chainable method merely replaces the saved
100
+ // methods in `ctx.__methods` instead of completely replacing the
101
+ // overwritten assertion. Therefore, an overwriting assertion won't
102
+ // set the `ssfi` or `lockSsfi` flags.
103
+ if (!flag(this, 'lockSsfi')) {
104
+ flag(this, 'ssfi', chainableMethodWrapper);
128
105
  }
129
- // Otherwise, redefine all properties (slow!)
130
- else {
131
- var asserterNames = Object.getOwnPropertyNames(ctx);
132
- asserterNames.forEach(function (asserterName) {
133
- if (excludeNames.indexOf(asserterName) !== -1) {
134
- return;
135
- }
136
-
137
- var pd = Object.getOwnPropertyDescriptor(ctx, asserterName);
138
- Object.defineProperty(chainableMethodWrapper, asserterName, pd);
139
- });
106
+
107
+ var result = chainableBehavior.method.apply(this, arguments);
108
+ if (result !== undefined) {
109
+ return result;
140
110
  }
141
111
 
142
- transferFlags(this, chainableMethodWrapper);
143
- return proxify(chainableMethodWrapper);
112
+ var newAssertion = new Assertion();
113
+ transferFlags(this, newAssertion);
114
+ return newAssertion;
115
+ };
116
+
117
+ addLengthGuard(chainableMethodWrapper, name, true);
118
+
119
+ // Use `Object.setPrototypeOf` if available
120
+ if (canSetPrototype) {
121
+ // Inherit all properties from the object by replacing the `Function` prototype
122
+ var prototype = Object.create(this);
123
+ // Restore the `call` and `apply` methods from `Function`
124
+ prototype.call = call;
125
+ prototype.apply = apply;
126
+ Object.setPrototypeOf(chainableMethodWrapper, prototype);
144
127
  }
145
- , configurable: true
128
+ // Otherwise, redefine all properties (slow!)
129
+ else {
130
+ var asserterNames = Object.getOwnPropertyNames(ctx);
131
+ asserterNames.forEach(function (asserterName) {
132
+ if (excludeNames.indexOf(asserterName) !== -1) {
133
+ return;
134
+ }
135
+
136
+ var pd = Object.getOwnPropertyDescriptor(ctx, asserterName);
137
+ Object.defineProperty(chainableMethodWrapper, asserterName, pd);
138
+ });
139
+ }
140
+
141
+ transferFlags(this, chainableMethodWrapper);
142
+ return proxify(chainableMethodWrapper);
143
+ },
144
+ configurable: true
146
145
  });
147
146
  }
@@ -46,13 +46,26 @@ export function addLengthGuard(fn, assertionName, isChainable) {
46
46
  Object.defineProperty(fn, 'length', {
47
47
  get: function () {
48
48
  if (isChainable) {
49
- throw Error('Invalid Chai property: ' + assertionName + '.length. Due' +
50
- ' to a compatibility issue, "length" cannot directly follow "' +
51
- assertionName + '". Use "' + assertionName + '.lengthOf" instead.');
49
+ throw Error(
50
+ 'Invalid Chai property: ' +
51
+ assertionName +
52
+ '.length. Due' +
53
+ ' to a compatibility issue, "length" cannot directly follow "' +
54
+ assertionName +
55
+ '". Use "' +
56
+ assertionName +
57
+ '.lengthOf" instead.'
58
+ );
52
59
  }
53
60
 
54
- throw Error('Invalid Chai property: ' + assertionName + '.length. See' +
55
- ' docs for proper usage of "' + assertionName + '".');
61
+ throw Error(
62
+ 'Invalid Chai property: ' +
63
+ assertionName +
64
+ '.length. See' +
65
+ ' docs for proper usage of "' +
66
+ assertionName +
67
+ '".'
68
+ );
56
69
  }
57
70
  });
58
71
 
@@ -54,8 +54,7 @@ export function addMethod(ctx, name, method) {
54
54
  }
55
55
 
56
56
  var result = method.apply(this, arguments);
57
- if (result !== undefined)
58
- return result;
57
+ if (result !== undefined) return result;
59
58
 
60
59
  var newAssertion = new Assertion();
61
60
  transferFlags(this, newAssertion);
@@ -37,35 +37,34 @@ import {transferFlags} from './transferFlags.js';
37
37
  export function addProperty(ctx, name, getter) {
38
38
  getter = getter === undefined ? function () {} : getter;
39
39
 
40
- Object.defineProperty(ctx, name,
41
- { get: function propertyGetter() {
42
- // Setting the `ssfi` flag to `propertyGetter` causes this function to
43
- // be the starting point for removing implementation frames from the
44
- // stack trace of a failed assertion.
45
- //
46
- // However, we only want to use this function as the starting point if
47
- // the `lockSsfi` flag isn't set and proxy protection is disabled.
48
- //
49
- // If the `lockSsfi` flag is set, then either this assertion has been
50
- // overwritten by another assertion, or this assertion is being invoked
51
- // from inside of another assertion. In the first case, the `ssfi` flag
52
- // has already been set by the overwriting assertion. In the second
53
- // case, the `ssfi` flag has already been set by the outer assertion.
54
- //
55
- // If proxy protection is enabled, then the `ssfi` flag has already been
56
- // set by the proxy getter.
57
- if (!isProxyEnabled() && !flag(this, 'lockSsfi')) {
58
- flag(this, 'ssfi', propertyGetter);
59
- }
40
+ Object.defineProperty(ctx, name, {
41
+ get: function propertyGetter() {
42
+ // Setting the `ssfi` flag to `propertyGetter` causes this function to
43
+ // be the starting point for removing implementation frames from the
44
+ // stack trace of a failed assertion.
45
+ //
46
+ // However, we only want to use this function as the starting point if
47
+ // the `lockSsfi` flag isn't set and proxy protection is disabled.
48
+ //
49
+ // If the `lockSsfi` flag is set, then either this assertion has been
50
+ // overwritten by another assertion, or this assertion is being invoked
51
+ // from inside of another assertion. In the first case, the `ssfi` flag
52
+ // has already been set by the overwriting assertion. In the second
53
+ // case, the `ssfi` flag has already been set by the outer assertion.
54
+ //
55
+ // If proxy protection is enabled, then the `ssfi` flag has already been
56
+ // set by the proxy getter.
57
+ if (!isProxyEnabled() && !flag(this, 'lockSsfi')) {
58
+ flag(this, 'ssfi', propertyGetter);
59
+ }
60
60
 
61
- var result = getter.call(this);
62
- if (result !== undefined)
63
- return result;
61
+ var result = getter.call(this);
62
+ if (result !== undefined) return result;
64
63
 
65
- var newAssertion = new Assertion();
66
- transferFlags(this, newAssertion);
67
- return newAssertion;
68
- }
69
- , configurable: true
64
+ var newAssertion = new Assertion();
65
+ transferFlags(this, newAssertion);
66
+ return newAssertion;
67
+ },
68
+ configurable: true
70
69
  });
71
70
  }
@@ -28,19 +28,27 @@ export function expectTypes(obj, types) {
28
28
  flagMsg = flagMsg ? flagMsg + ': ' : '';
29
29
 
30
30
  obj = flag(obj, 'object');
31
- types = types.map(function (t) { return t.toLowerCase(); });
31
+ types = types.map(function (t) {
32
+ return t.toLowerCase();
33
+ });
32
34
  types.sort();
33
35
 
34
36
  // Transforms ['lorem', 'ipsum'] into 'a lorem, or an ipsum'
35
- var str = types.map(function (t, index) {
36
- var art = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(t.charAt(0)) ? 'an' : 'a';
37
- var or = types.length > 1 && index === types.length - 1 ? 'or ' : '';
38
- return or + art + ' ' + t;
39
- }).join(', ');
37
+ var str = types
38
+ .map(function (t, index) {
39
+ var art = ~['a', 'e', 'i', 'o', 'u'].indexOf(t.charAt(0)) ? 'an' : 'a';
40
+ var or = types.length > 1 && index === types.length - 1 ? 'or ' : '';
41
+ return or + art + ' ' + t;
42
+ })
43
+ .join(', ');
40
44
 
41
45
  var objType = type(obj).toLowerCase();
42
46
 
43
- if (!types.some(function (expected) { return objType === expected; })) {
47
+ if (
48
+ !types.some(function (expected) {
49
+ return objType === expected;
50
+ })
51
+ ) {
44
52
  throw new AssertionError(
45
53
  flagMsg + 'object tested must be ' + str + ', but ' + objType + ' given',
46
54
  undefined,
@@ -28,19 +28,25 @@ import {objDisplay} from './objDisplay.js';
28
28
  * @public
29
29
  */
30
30
  export function getMessage(obj, args) {
31
- var negate = flag(obj, 'negate')
32
- , val = flag(obj, 'object')
33
- , expected = args[3]
34
- , actual = getActual(obj, args)
35
- , msg = negate ? args[2] : args[1]
36
- , flagMsg = flag(obj, 'message');
31
+ var negate = flag(obj, 'negate'),
32
+ val = flag(obj, 'object'),
33
+ expected = args[3],
34
+ actual = getActual(obj, args),
35
+ msg = negate ? args[2] : args[1],
36
+ flagMsg = flag(obj, 'message');
37
37
 
38
- if(typeof msg === "function") msg = msg();
38
+ if (typeof msg === 'function') msg = msg();
39
39
  msg = msg || '';
40
40
  msg = msg
41
- .replace(/#\{this\}/g, function () { return objDisplay(val); })
42
- .replace(/#\{act\}/g, function () { return objDisplay(actual); })
43
- .replace(/#\{exp\}/g, function () { return objDisplay(expected); });
41
+ .replace(/#\{this\}/g, function () {
42
+ return objDisplay(val);
43
+ })
44
+ .replace(/#\{act\}/g, function () {
45
+ return objDisplay(actual);
46
+ })
47
+ .replace(/#\{exp\}/g, function () {
48
+ return objDisplay(expected);
49
+ });
44
50
 
45
51
  return flagMsg ? flagMsg + ': ' + msg : msg;
46
52
  }
@@ -11,7 +11,8 @@ import * as checkError from 'check-error';
11
11
  export {test} from './test.js';
12
12
 
13
13
  // type utility
14
- export {type} from './type-detect.js';
14
+ import {type} from './type-detect.js';
15
+ export {type};
15
16
 
16
17
  // expectTypes utility
17
18
  export {expectTypes} from './expectTypes.js';
@@ -47,7 +48,7 @@ export {getPathInfo, hasProperty} from 'pathval';
47
48
  * @returns {string}
48
49
  */
49
50
  export function getName(fn) {
50
- return fn.name
51
+ return fn.name;
51
52
  }
52
53
 
53
54
  // add Property
@@ -105,3 +106,13 @@ export {getOperator} from './getOperator.js';
105
106
  export function isRegExp(obj) {
106
107
  return Object.prototype.toString.call(obj) === '[object RegExp]';
107
108
  }
109
+
110
+ /**
111
+ * Determines if an object is numeric or not
112
+ *
113
+ * @param {unknown} obj Object to test
114
+ * @returns {boolean}
115
+ */
116
+ export function isNumeric(obj) {
117
+ return ['Number', 'BigInt'].includes(type(obj));
118
+ }
@@ -23,9 +23,9 @@ import {config} from '../config.js';
23
23
  export function inspect(obj, showHidden, depth, colors) {
24
24
  var options = {
25
25
  colors: colors,
26
- depth: (typeof depth === 'undefined' ? 2 : depth),
26
+ depth: typeof depth === 'undefined' ? 2 : depth,
27
27
  showHidden: showHidden,
28
- truncate: config.truncateThreshold ? config.truncateThreshold : Infinity,
28
+ truncate: config.truncateThreshold ? config.truncateThreshold : Infinity
29
29
  };
30
30
  return _inspect(obj, options);
31
31
  }
@@ -4,23 +4,4 @@
4
4
  * MIT Licensed
5
5
  */
6
6
 
7
- /**
8
- * ### .isNaN(value)
9
- *
10
- * Checks if the given value is NaN or not.
11
- *
12
- * utils.isNaN(NaN); // true
13
- *
14
- * @param {unknown} value The value which has to be checked if it is NaN
15
- * @returns {boolean}
16
- * @name isNaN
17
- * @private
18
- */
19
- function _isNaN(value) {
20
- // Refer http://www.ecma-international.org/ecma-262/6.0/#sec-isnan-number
21
- // section's NOTE.
22
- return value !== value;
23
- }
24
-
25
- // If ECMAScript 6's Number.isNaN is present, prefer that.
26
- export const isNaN = Number.isNaN || _isNaN;
7
+ export const isNaN = Number.isNaN;
@@ -18,7 +18,9 @@ import {config} from '../config.js';
18
18
  * @returns {boolean}
19
19
  */
20
20
  export function isProxyEnabled() {
21
- return config.useProxy &&
21
+ return (
22
+ config.useProxy &&
22
23
  typeof Proxy !== 'undefined' &&
23
- typeof Reflect !== 'undefined';
24
+ typeof Reflect !== 'undefined'
25
+ );
24
26
  }
@@ -21,8 +21,8 @@ import {config} from '../config.js';
21
21
  * @public
22
22
  */
23
23
  export function objDisplay(obj) {
24
- var str = inspect(obj)
25
- , type = Object.prototype.toString.call(obj);
24
+ var str = inspect(obj),
25
+ type = Object.prototype.toString.call(obj);
26
26
 
27
27
  if (config.truncateThreshold && str.length >= config.truncateThreshold) {
28
28
  if (type === '[object Function]') {
@@ -32,10 +32,11 @@ export function objDisplay(obj) {
32
32
  } else if (type === '[object Array]') {
33
33
  return '[ Array(' + obj.length + ') ]';
34
34
  } else if (type === '[object Object]') {
35
- var keys = Object.keys(obj)
36
- , kstr = keys.length > 2
37
- ? keys.splice(0, 2).join(', ') + ', ...'
38
- : keys.join(', ');
35
+ var keys = Object.keys(obj),
36
+ kstr =
37
+ keys.length > 2
38
+ ? keys.splice(0, 2).join(', ') + ', ...'
39
+ : keys.join(', ');
39
40
  return '{ Object (' + kstr + ') }';
40
41
  } else {
41
42
  return str;
@@ -43,16 +43,17 @@ export function overwriteChainableMethod(ctx, name, method, chainingBehavior) {
43
43
  var chainableBehavior = ctx.__methods[name];
44
44
 
45
45
  var _chainingBehavior = chainableBehavior.chainingBehavior;
46
- chainableBehavior.chainingBehavior = function overwritingChainableMethodGetter() {
47
- var result = chainingBehavior(_chainingBehavior).call(this);
48
- if (result !== undefined) {
49
- return result;
50
- }
46
+ chainableBehavior.chainingBehavior =
47
+ function overwritingChainableMethodGetter() {
48
+ var result = chainingBehavior(_chainingBehavior).call(this);
49
+ if (result !== undefined) {
50
+ return result;
51
+ }
51
52
 
52
- var newAssertion = new Assertion();
53
- transferFlags(this, newAssertion);
54
- return newAssertion;
55
- };
53
+ var newAssertion = new Assertion();
54
+ transferFlags(this, newAssertion);
55
+ return newAssertion;
56
+ };
56
57
 
57
58
  var _method = chainableBehavior.method;
58
59
  chainableBehavior.method = function overwritingChainableMethodWrapper() {
@@ -44,13 +44,12 @@ import {transferFlags} from './transferFlags.js';
44
44
  * @public
45
45
  */
46
46
  export function overwriteMethod(ctx, name, method) {
47
- var _method = ctx[name]
48
- , _super = function () {
47
+ var _method = ctx[name],
48
+ _super = function () {
49
49
  throw new Error(name + ' is not a function');
50
50
  };
51
51
 
52
- if (_method && 'function' === typeof _method)
53
- _super = _method;
52
+ if (_method && 'function' === typeof _method) _super = _method;
54
53
 
55
54
  var overwritingMethodWrapper = function () {
56
55
  // Setting the `ssfi` flag to `overwritingMethodWrapper` causes this
@@ -84,7 +83,7 @@ export function overwriteMethod(ctx, name, method) {
84
83
  var newAssertion = new Assertion();
85
84
  transferFlags(this, newAssertion);
86
85
  return newAssertion;
87
- }
86
+ };
88
87
 
89
88
  addLengthGuard(overwritingMethodWrapper, name, false);
90
89
  ctx[name] = proxify(overwritingMethodWrapper, name);