chai 6.2.1 → 6.2.2
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.
- package/index.js +3 -248
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -697,8 +697,8 @@ __name(inspectHTML, "inspectHTML");
|
|
|
697
697
|
|
|
698
698
|
// node_modules/loupe/lib/index.js
|
|
699
699
|
var symbolsSupported = typeof Symbol === "function" && typeof Symbol.for === "function";
|
|
700
|
-
var chaiInspect = symbolsSupported ? Symbol.for("chai/inspect") : "@@chai/inspect";
|
|
701
|
-
var nodeInspect = Symbol.for("nodejs.util.inspect.custom");
|
|
700
|
+
var chaiInspect = symbolsSupported ? /* @__PURE__ */ Symbol.for("chai/inspect") : "@@chai/inspect";
|
|
701
|
+
var nodeInspect = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
702
702
|
var constructorMap = /* @__PURE__ */ new WeakMap();
|
|
703
703
|
var stringTagMap = {};
|
|
704
704
|
var baseTypesMap = {
|
|
@@ -2958,7 +2958,7 @@ function closeTo(expected, delta, msg) {
|
|
|
2958
2958
|
);
|
|
2959
2959
|
}
|
|
2960
2960
|
new Assertion(expected, flagMsg, ssfi, true).is.numeric;
|
|
2961
|
-
const abs = /* @__PURE__ */ __name((x) => x <
|
|
2961
|
+
const abs = /* @__PURE__ */ __name((x) => x < 0 ? -x : x, "abs");
|
|
2962
2962
|
const strip = /* @__PURE__ */ __name((number) => parseFloat(parseFloat(number).toPrecision(12)), "strip");
|
|
2963
2963
|
this.assert(
|
|
2964
2964
|
strip(abs(obj - expected)) <= delta,
|
|
@@ -4170,248 +4170,3 @@ export {
|
|
|
4170
4170
|
use,
|
|
4171
4171
|
utils_exports as util
|
|
4172
4172
|
};
|
|
4173
|
-
/*!
|
|
4174
|
-
* Chai - flag utility
|
|
4175
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4176
|
-
* MIT Licensed
|
|
4177
|
-
*/
|
|
4178
|
-
/*!
|
|
4179
|
-
* Chai - test utility
|
|
4180
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4181
|
-
* MIT Licensed
|
|
4182
|
-
*/
|
|
4183
|
-
/*!
|
|
4184
|
-
* Chai - expectTypes utility
|
|
4185
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4186
|
-
* MIT Licensed
|
|
4187
|
-
*/
|
|
4188
|
-
/*!
|
|
4189
|
-
* Chai - getActual utility
|
|
4190
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4191
|
-
* MIT Licensed
|
|
4192
|
-
*/
|
|
4193
|
-
/*!
|
|
4194
|
-
* Chai - message composition utility
|
|
4195
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4196
|
-
* MIT Licensed
|
|
4197
|
-
*/
|
|
4198
|
-
/*!
|
|
4199
|
-
* Chai - transferFlags utility
|
|
4200
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4201
|
-
* MIT Licensed
|
|
4202
|
-
*/
|
|
4203
|
-
/*!
|
|
4204
|
-
* chai
|
|
4205
|
-
* http://chaijs.com
|
|
4206
|
-
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4207
|
-
* MIT Licensed
|
|
4208
|
-
*/
|
|
4209
|
-
/*!
|
|
4210
|
-
* Chai - events utility
|
|
4211
|
-
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
4212
|
-
* MIT Licensed
|
|
4213
|
-
*/
|
|
4214
|
-
/*!
|
|
4215
|
-
* Chai - isProxyEnabled helper
|
|
4216
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4217
|
-
* MIT Licensed
|
|
4218
|
-
*/
|
|
4219
|
-
/*!
|
|
4220
|
-
* Chai - addProperty utility
|
|
4221
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4222
|
-
* MIT Licensed
|
|
4223
|
-
*/
|
|
4224
|
-
/*!
|
|
4225
|
-
* Chai - addLengthGuard utility
|
|
4226
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4227
|
-
* MIT Licensed
|
|
4228
|
-
*/
|
|
4229
|
-
/*!
|
|
4230
|
-
* Chai - getProperties utility
|
|
4231
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4232
|
-
* MIT Licensed
|
|
4233
|
-
*/
|
|
4234
|
-
/*!
|
|
4235
|
-
* Chai - proxify utility
|
|
4236
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4237
|
-
* MIT Licensed
|
|
4238
|
-
*/
|
|
4239
|
-
/*!
|
|
4240
|
-
* Chai - addMethod utility
|
|
4241
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4242
|
-
* MIT Licensed
|
|
4243
|
-
*/
|
|
4244
|
-
/*!
|
|
4245
|
-
* Chai - overwriteProperty utility
|
|
4246
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4247
|
-
* MIT Licensed
|
|
4248
|
-
*/
|
|
4249
|
-
/*!
|
|
4250
|
-
* Chai - overwriteMethod utility
|
|
4251
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4252
|
-
* MIT Licensed
|
|
4253
|
-
*/
|
|
4254
|
-
/*!
|
|
4255
|
-
* Chai - addChainingMethod utility
|
|
4256
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4257
|
-
* MIT Licensed
|
|
4258
|
-
*/
|
|
4259
|
-
/*!
|
|
4260
|
-
* Chai - overwriteChainableMethod utility
|
|
4261
|
-
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4262
|
-
* MIT Licensed
|
|
4263
|
-
*/
|
|
4264
|
-
/*!
|
|
4265
|
-
* Chai - compareByInspect utility
|
|
4266
|
-
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
4267
|
-
* MIT Licensed
|
|
4268
|
-
*/
|
|
4269
|
-
/*!
|
|
4270
|
-
* Chai - getOwnEnumerablePropertySymbols utility
|
|
4271
|
-
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
4272
|
-
* MIT Licensed
|
|
4273
|
-
*/
|
|
4274
|
-
/*!
|
|
4275
|
-
* Chai - getOwnEnumerableProperties utility
|
|
4276
|
-
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
4277
|
-
* MIT Licensed
|
|
4278
|
-
*/
|
|
4279
|
-
/*!
|
|
4280
|
-
* Chai - isNaN utility
|
|
4281
|
-
* Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
|
4282
|
-
* MIT Licensed
|
|
4283
|
-
*/
|
|
4284
|
-
/*!
|
|
4285
|
-
* chai
|
|
4286
|
-
* Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
|
|
4287
|
-
* MIT Licensed
|
|
4288
|
-
*/
|
|
4289
|
-
/*!
|
|
4290
|
-
* chai
|
|
4291
|
-
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
4292
|
-
* MIT Licensed
|
|
4293
|
-
*/
|
|
4294
|
-
/*! Bundled license information:
|
|
4295
|
-
|
|
4296
|
-
deep-eql/index.js:
|
|
4297
|
-
(*!
|
|
4298
|
-
* deep-eql
|
|
4299
|
-
* Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
|
|
4300
|
-
* MIT Licensed
|
|
4301
|
-
*)
|
|
4302
|
-
(*!
|
|
4303
|
-
* Check to see if the MemoizeMap has recorded a result of the two operands
|
|
4304
|
-
*
|
|
4305
|
-
* @param {Mixed} leftHandOperand
|
|
4306
|
-
* @param {Mixed} rightHandOperand
|
|
4307
|
-
* @param {MemoizeMap} memoizeMap
|
|
4308
|
-
* @returns {Boolean|null} result
|
|
4309
|
-
*)
|
|
4310
|
-
(*!
|
|
4311
|
-
* Set the result of the equality into the MemoizeMap
|
|
4312
|
-
*
|
|
4313
|
-
* @param {Mixed} leftHandOperand
|
|
4314
|
-
* @param {Mixed} rightHandOperand
|
|
4315
|
-
* @param {MemoizeMap} memoizeMap
|
|
4316
|
-
* @param {Boolean} result
|
|
4317
|
-
*)
|
|
4318
|
-
(*!
|
|
4319
|
-
* Primary Export
|
|
4320
|
-
*)
|
|
4321
|
-
(*!
|
|
4322
|
-
* The main logic of the `deepEqual` function.
|
|
4323
|
-
*
|
|
4324
|
-
* @param {Mixed} leftHandOperand
|
|
4325
|
-
* @param {Mixed} rightHandOperand
|
|
4326
|
-
* @param {Object} [options] (optional) Additional options
|
|
4327
|
-
* @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.
|
|
4328
|
-
* @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of
|
|
4329
|
-
complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular
|
|
4330
|
-
references to blow the stack.
|
|
4331
|
-
* @return {Boolean} equal match
|
|
4332
|
-
*)
|
|
4333
|
-
(*!
|
|
4334
|
-
* Compare two Regular Expressions for equality.
|
|
4335
|
-
*
|
|
4336
|
-
* @param {RegExp} leftHandOperand
|
|
4337
|
-
* @param {RegExp} rightHandOperand
|
|
4338
|
-
* @return {Boolean} result
|
|
4339
|
-
*)
|
|
4340
|
-
(*!
|
|
4341
|
-
* Compare two Sets/Maps for equality. Faster than other equality functions.
|
|
4342
|
-
*
|
|
4343
|
-
* @param {Set} leftHandOperand
|
|
4344
|
-
* @param {Set} rightHandOperand
|
|
4345
|
-
* @param {Object} [options] (Optional)
|
|
4346
|
-
* @return {Boolean} result
|
|
4347
|
-
*)
|
|
4348
|
-
(*!
|
|
4349
|
-
* Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.
|
|
4350
|
-
*
|
|
4351
|
-
* @param {Iterable} leftHandOperand
|
|
4352
|
-
* @param {Iterable} rightHandOperand
|
|
4353
|
-
* @param {Object} [options] (Optional)
|
|
4354
|
-
* @return {Boolean} result
|
|
4355
|
-
*)
|
|
4356
|
-
(*!
|
|
4357
|
-
* Simple equality for generator objects such as those returned by generator functions.
|
|
4358
|
-
*
|
|
4359
|
-
* @param {Iterable} leftHandOperand
|
|
4360
|
-
* @param {Iterable} rightHandOperand
|
|
4361
|
-
* @param {Object} [options] (Optional)
|
|
4362
|
-
* @return {Boolean} result
|
|
4363
|
-
*)
|
|
4364
|
-
(*!
|
|
4365
|
-
* Determine if the given object has an @@iterator function.
|
|
4366
|
-
*
|
|
4367
|
-
* @param {Object} target
|
|
4368
|
-
* @return {Boolean} `true` if the object has an @@iterator function.
|
|
4369
|
-
*)
|
|
4370
|
-
(*!
|
|
4371
|
-
* Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.
|
|
4372
|
-
* This will consume the iterator - which could have side effects depending on the @@iterator implementation.
|
|
4373
|
-
*
|
|
4374
|
-
* @param {Object} target
|
|
4375
|
-
* @returns {Array} an array of entries from the @@iterator function
|
|
4376
|
-
*)
|
|
4377
|
-
(*!
|
|
4378
|
-
* Gets all entries from a Generator. This will consume the generator - which could have side effects.
|
|
4379
|
-
*
|
|
4380
|
-
* @param {Generator} target
|
|
4381
|
-
* @returns {Array} an array of entries from the Generator.
|
|
4382
|
-
*)
|
|
4383
|
-
(*!
|
|
4384
|
-
* Gets all own and inherited enumerable keys from a target.
|
|
4385
|
-
*
|
|
4386
|
-
* @param {Object} target
|
|
4387
|
-
* @returns {Array} an array of own and inherited enumerable keys from the target.
|
|
4388
|
-
*)
|
|
4389
|
-
(*!
|
|
4390
|
-
* Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of
|
|
4391
|
-
* each key. If any value of the given key is not equal, the function will return false (early).
|
|
4392
|
-
*
|
|
4393
|
-
* @param {Mixed} leftHandOperand
|
|
4394
|
-
* @param {Mixed} rightHandOperand
|
|
4395
|
-
* @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against
|
|
4396
|
-
* @param {Object} [options] (Optional)
|
|
4397
|
-
* @return {Boolean} result
|
|
4398
|
-
*)
|
|
4399
|
-
(*!
|
|
4400
|
-
* Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`
|
|
4401
|
-
* for each enumerable key in the object.
|
|
4402
|
-
*
|
|
4403
|
-
* @param {Mixed} leftHandOperand
|
|
4404
|
-
* @param {Mixed} rightHandOperand
|
|
4405
|
-
* @param {Object} [options] (Optional)
|
|
4406
|
-
* @return {Boolean} result
|
|
4407
|
-
*)
|
|
4408
|
-
(*!
|
|
4409
|
-
* Returns true if the argument is a primitive.
|
|
4410
|
-
*
|
|
4411
|
-
* This intentionally returns true for all objects that can be compared by reference,
|
|
4412
|
-
* including functions and symbols.
|
|
4413
|
-
*
|
|
4414
|
-
* @param {Mixed} value
|
|
4415
|
-
* @return {Boolean} result
|
|
4416
|
-
*)
|
|
4417
|
-
*/
|
package/package.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"Veselin Todorov <hi@vesln.com>",
|
|
23
23
|
"John Firebaugh <john.firebaugh@gmail.com>"
|
|
24
24
|
],
|
|
25
|
-
"version": "6.2.
|
|
25
|
+
"version": "6.2.2",
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
28
28
|
"url": "https://github.com/chaijs/chai"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"main": "./index.js",
|
|
34
34
|
"scripts": {
|
|
35
|
-
"build": "esbuild --bundle --format=esm --target=es2021 --keep-names --outfile=index.js lib/chai.js",
|
|
35
|
+
"build": "esbuild --bundle --format=esm --target=es2021 --keep-names --legal-comments=none --outfile=index.js lib/chai.js",
|
|
36
36
|
"prebuild": "npm run clean",
|
|
37
37
|
"format": "prettier --write lib",
|
|
38
38
|
"pretest": "npm run lint",
|