chai 5.3.2 → 5.3.3

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.
Files changed (2) hide show
  1. package/index.js +190 -54
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
2
3
  var __export = (target, all) => {
3
4
  for (var name in all)
4
5
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -51,12 +52,15 @@ __export(check_error_exports, {
51
52
  function isErrorInstance(obj) {
52
53
  return obj instanceof Error || Object.prototype.toString.call(obj) === "[object Error]";
53
54
  }
55
+ __name(isErrorInstance, "isErrorInstance");
54
56
  function isRegExp(obj) {
55
57
  return Object.prototype.toString.call(obj) === "[object RegExp]";
56
58
  }
59
+ __name(isRegExp, "isRegExp");
57
60
  function compatibleInstance(thrown, errorLike) {
58
61
  return isErrorInstance(errorLike) && thrown === errorLike;
59
62
  }
63
+ __name(compatibleInstance, "compatibleInstance");
60
64
  function compatibleConstructor(thrown, errorLike) {
61
65
  if (isErrorInstance(errorLike)) {
62
66
  return thrown.constructor === errorLike.constructor || thrown instanceof errorLike.constructor;
@@ -65,6 +69,7 @@ function compatibleConstructor(thrown, errorLike) {
65
69
  }
66
70
  return false;
67
71
  }
72
+ __name(compatibleConstructor, "compatibleConstructor");
68
73
  function compatibleMessage(thrown, errMatcher) {
69
74
  const comparisonString = typeof thrown === "string" ? thrown : thrown.message;
70
75
  if (isRegExp(errMatcher)) {
@@ -74,6 +79,7 @@ function compatibleMessage(thrown, errMatcher) {
74
79
  }
75
80
  return false;
76
81
  }
82
+ __name(compatibleMessage, "compatibleMessage");
77
83
  function getConstructorName(errorLike) {
78
84
  let constructorName = errorLike;
79
85
  if (isErrorInstance(errorLike)) {
@@ -87,6 +93,7 @@ function getConstructorName(errorLike) {
87
93
  }
88
94
  return constructorName;
89
95
  }
96
+ __name(getConstructorName, "getConstructorName");
90
97
  function getMessage(errorLike) {
91
98
  let msg = "";
92
99
  if (errorLike && errorLike.message) {
@@ -96,6 +103,7 @@ function getMessage(errorLike) {
96
103
  }
97
104
  return msg;
98
105
  }
106
+ __name(getMessage, "getMessage");
99
107
 
100
108
  // lib/chai/utils/flag.js
101
109
  function flag(obj, key, value) {
@@ -106,12 +114,14 @@ function flag(obj, key, value) {
106
114
  return flags[key];
107
115
  }
108
116
  }
117
+ __name(flag, "flag");
109
118
 
110
119
  // lib/chai/utils/test.js
111
120
  function test(obj, args) {
112
121
  let negate = flag(obj, "negate"), expr = args[0];
113
122
  return negate ? !expr : expr;
114
123
  }
124
+ __name(test, "test");
115
125
 
116
126
  // lib/chai/utils/type-detect.js
117
127
  function type(obj) {
@@ -128,10 +138,14 @@ function type(obj) {
128
138
  const type3 = Object.prototype.toString.call(obj).slice(8, -1);
129
139
  return type3;
130
140
  }
141
+ __name(type, "type");
131
142
 
132
143
  // node_modules/assertion-error/index.js
133
144
  var canElideFrames = "captureStackTrace" in Error;
134
145
  var AssertionError = class _AssertionError extends Error {
146
+ static {
147
+ __name(this, "AssertionError");
148
+ }
135
149
  message;
136
150
  get name() {
137
151
  return "AssertionError";
@@ -188,11 +202,13 @@ function expectTypes(obj, types) {
188
202
  );
189
203
  }
190
204
  }
205
+ __name(expectTypes, "expectTypes");
191
206
 
192
207
  // lib/chai/utils/getActual.js
193
208
  function getActual(obj, args) {
194
209
  return args.length > 4 ? args[4] : obj._obj;
195
210
  }
211
+ __name(getActual, "getActual");
196
212
 
197
213
  // node_modules/loupe/lib/helpers.js
198
214
  var ansiColors = {
@@ -244,6 +260,7 @@ function colorise(value, styleType) {
244
260
  }
245
261
  return `\x1B[${color[0]}m${String(value)}\x1B[${color[1]}m`;
246
262
  }
263
+ __name(colorise, "colorise");
247
264
  function normaliseOptions({
248
265
  showHidden = false,
249
266
  depth = 2,
@@ -275,9 +292,11 @@ function normaliseOptions({
275
292
  }
276
293
  return options;
277
294
  }
295
+ __name(normaliseOptions, "normaliseOptions");
278
296
  function isHighSurrogate(char) {
279
297
  return char >= "\uD800" && char <= "\uDBFF";
280
298
  }
299
+ __name(isHighSurrogate, "isHighSurrogate");
281
300
  function truncate(string, length, tail = truncator) {
282
301
  string = String(string);
283
302
  const tailLength = tail.length;
@@ -294,6 +313,7 @@ function truncate(string, length, tail = truncator) {
294
313
  }
295
314
  return string;
296
315
  }
316
+ __name(truncate, "truncate");
297
317
  function inspectList(list, options, inspectItem, separator = ", ") {
298
318
  inspectItem = inspectItem || options.inspect;
299
319
  const size = list.length;
@@ -331,12 +351,14 @@ function inspectList(list, options, inspectItem, separator = ", ") {
331
351
  }
332
352
  return `${output}${truncated}`;
333
353
  }
354
+ __name(inspectList, "inspectList");
334
355
  function quoteComplexKey(key) {
335
356
  if (key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)) {
336
357
  return key;
337
358
  }
338
359
  return JSON.stringify(key).replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
339
360
  }
361
+ __name(quoteComplexKey, "quoteComplexKey");
340
362
  function inspectProperty([key, value], options) {
341
363
  options.truncate -= 2;
342
364
  if (typeof key === "string") {
@@ -348,6 +370,7 @@ function inspectProperty([key, value], options) {
348
370
  value = options.inspect(value, options);
349
371
  return `${key}: ${value}`;
350
372
  }
373
+ __name(inspectProperty, "inspectProperty");
351
374
 
352
375
  // node_modules/loupe/lib/array.js
353
376
  function inspectArray(array, options) {
@@ -363,9 +386,10 @@ function inspectArray(array, options) {
363
386
  }
364
387
  return `[ ${listContents}${propertyContents ? `, ${propertyContents}` : ""} ]`;
365
388
  }
389
+ __name(inspectArray, "inspectArray");
366
390
 
367
391
  // node_modules/loupe/lib/typedarray.js
368
- var getArrayName = (array) => {
392
+ var getArrayName = /* @__PURE__ */ __name((array) => {
369
393
  if (typeof Buffer === "function" && array instanceof Buffer) {
370
394
  return "Buffer";
371
395
  }
@@ -373,7 +397,7 @@ var getArrayName = (array) => {
373
397
  return array[Symbol.toStringTag];
374
398
  }
375
399
  return array.constructor.name;
376
- };
400
+ }, "getArrayName");
377
401
  function inspectTypedArray(array, options) {
378
402
  const name = getArrayName(array);
379
403
  options.truncate -= name.length + 4;
@@ -396,6 +420,7 @@ function inspectTypedArray(array, options) {
396
420
  }
397
421
  return `${name}[ ${output}${propertyContents ? `, ${propertyContents}` : ""} ]`;
398
422
  }
423
+ __name(inspectTypedArray, "inspectTypedArray");
399
424
 
400
425
  // node_modules/loupe/lib/date.js
401
426
  function inspectDate(dateObject, options) {
@@ -407,6 +432,7 @@ function inspectDate(dateObject, options) {
407
432
  const date = split[0];
408
433
  return options.stylize(`${date}T${truncate(split[1], options.truncate - date.length - 1)}`, "date");
409
434
  }
435
+ __name(inspectDate, "inspectDate");
410
436
 
411
437
  // node_modules/loupe/lib/function.js
412
438
  function inspectFunction(func, options) {
@@ -417,6 +443,7 @@ function inspectFunction(func, options) {
417
443
  }
418
444
  return options.stylize(`[${functionType} ${truncate(name, options.truncate - 11)}]`, "special");
419
445
  }
446
+ __name(inspectFunction, "inspectFunction");
420
447
 
421
448
  // node_modules/loupe/lib/map.js
422
449
  function inspectMapEntry([key, value], options) {
@@ -426,6 +453,7 @@ function inspectMapEntry([key, value], options) {
426
453
  value = options.inspect(value, options);
427
454
  return `${key} => ${value}`;
428
455
  }
456
+ __name(inspectMapEntry, "inspectMapEntry");
429
457
  function mapToEntries(map) {
430
458
  const entries = [];
431
459
  map.forEach((value, key) => {
@@ -433,12 +461,14 @@ function mapToEntries(map) {
433
461
  });
434
462
  return entries;
435
463
  }
464
+ __name(mapToEntries, "mapToEntries");
436
465
  function inspectMap(map, options) {
437
466
  if (map.size === 0)
438
467
  return "Map{}";
439
468
  options.truncate -= 7;
440
469
  return `Map{ ${inspectList(mapToEntries(map), options, inspectMapEntry)} }`;
441
470
  }
471
+ __name(inspectMap, "inspectMap");
442
472
 
443
473
  // node_modules/loupe/lib/number.js
444
474
  var isNaN = Number.isNaN || ((i) => i !== i);
@@ -457,6 +487,7 @@ function inspectNumber(number, options) {
457
487
  }
458
488
  return options.stylize(truncate(String(number), options.truncate), "number");
459
489
  }
490
+ __name(inspectNumber, "inspectNumber");
460
491
 
461
492
  // node_modules/loupe/lib/bigint.js
462
493
  function inspectBigInt(number, options) {
@@ -465,6 +496,7 @@ function inspectBigInt(number, options) {
465
496
  nums += "n";
466
497
  return options.stylize(nums, "bigint");
467
498
  }
499
+ __name(inspectBigInt, "inspectBigInt");
468
500
 
469
501
  // node_modules/loupe/lib/regexp.js
470
502
  function inspectRegExp(value, options) {
@@ -473,6 +505,7 @@ function inspectRegExp(value, options) {
473
505
  const source = value.source;
474
506
  return options.stylize(`/${truncate(source, sourceLength)}/${flags}`, "regexp");
475
507
  }
508
+ __name(inspectRegExp, "inspectRegExp");
476
509
 
477
510
  // node_modules/loupe/lib/set.js
478
511
  function arrayFromSet(set2) {
@@ -482,12 +515,14 @@ function arrayFromSet(set2) {
482
515
  });
483
516
  return values;
484
517
  }
518
+ __name(arrayFromSet, "arrayFromSet");
485
519
  function inspectSet(set2, options) {
486
520
  if (set2.size === 0)
487
521
  return "Set{}";
488
522
  options.truncate -= 7;
489
523
  return `Set{ ${inspectList(arrayFromSet(set2), options)} }`;
490
524
  }
525
+ __name(inspectSet, "inspectSet");
491
526
 
492
527
  // node_modules/loupe/lib/string.js
493
528
  var stringEscapeChars = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]", "g");
@@ -505,12 +540,14 @@ var unicodeLength = 4;
505
540
  function escape(char) {
506
541
  return escapeCharacters[char] || `\\u${`0000${char.charCodeAt(0).toString(hex)}`.slice(-unicodeLength)}`;
507
542
  }
543
+ __name(escape, "escape");
508
544
  function inspectString(string, options) {
509
545
  if (stringEscapeChars.test(string)) {
510
546
  string = string.replace(stringEscapeChars, escape);
511
547
  }
512
548
  return options.stylize(`'${truncate(string, options.truncate - 2)}'`, "string");
513
549
  }
550
+ __name(inspectString, "inspectString");
514
551
 
515
552
  // node_modules/loupe/lib/symbol.js
516
553
  function inspectSymbol(value) {
@@ -519,9 +556,10 @@ function inspectSymbol(value) {
519
556
  }
520
557
  return value.toString();
521
558
  }
559
+ __name(inspectSymbol, "inspectSymbol");
522
560
 
523
561
  // node_modules/loupe/lib/promise.js
524
- var getPromiseValue = () => "Promise{\u2026}";
562
+ var getPromiseValue = /* @__PURE__ */ __name(() => "Promise{\u2026}", "getPromiseValue");
525
563
  var promise_default = getPromiseValue;
526
564
 
527
565
  // node_modules/loupe/lib/object.js
@@ -546,6 +584,7 @@ function inspectObject(object, options) {
546
584
  }
547
585
  return `{ ${propertyContents}${sep}${symbolContents} }`;
548
586
  }
587
+ __name(inspectObject, "inspectObject");
549
588
 
550
589
  // node_modules/loupe/lib/class.js
551
590
  var toStringTag = typeof Symbol !== "undefined" && Symbol.toStringTag ? Symbol.toStringTag : false;
@@ -561,6 +600,7 @@ function inspectClass(value, options) {
561
600
  options.truncate -= name.length;
562
601
  return `${name}${inspectObject(value, options)}`;
563
602
  }
603
+ __name(inspectClass, "inspectClass");
564
604
 
565
605
  // node_modules/loupe/lib/arguments.js
566
606
  function inspectArguments(args, options) {
@@ -569,6 +609,7 @@ function inspectArguments(args, options) {
569
609
  options.truncate -= 13;
570
610
  return `Arguments[ ${inspectList(args, options)} ]`;
571
611
  }
612
+ __name(inspectArguments, "inspectArguments");
572
613
 
573
614
  // node_modules/loupe/lib/error.js
574
615
  var errorKeys = [
@@ -604,6 +645,7 @@ function inspectObject2(error, options) {
604
645
  const propertyContents = inspectList(properties.map((key) => [key, error[key]]), options, inspectProperty);
605
646
  return `${name}${message}${propertyContents ? ` { ${propertyContents} }` : ""}`;
606
647
  }
648
+ __name(inspectObject2, "inspectObject");
607
649
 
608
650
  // node_modules/loupe/lib/html.js
609
651
  function inspectAttribute([key, value], options) {
@@ -613,9 +655,11 @@ function inspectAttribute([key, value], options) {
613
655
  }
614
656
  return `${options.stylize(String(key), "yellow")}=${options.stylize(`"${value}"`, "string")}`;
615
657
  }
658
+ __name(inspectAttribute, "inspectAttribute");
616
659
  function inspectNodeCollection(collection, options) {
617
660
  return inspectList(collection, options, inspectNode, "\n");
618
661
  }
662
+ __name(inspectNodeCollection, "inspectNodeCollection");
619
663
  function inspectNode(node, options) {
620
664
  switch (node.nodeType) {
621
665
  case 1:
@@ -626,6 +670,7 @@ function inspectNode(node, options) {
626
670
  return options.inspect(node, options);
627
671
  }
628
672
  }
673
+ __name(inspectNode, "inspectNode");
629
674
  function inspectHTML(element, options) {
630
675
  const properties = element.getAttributeNames();
631
676
  const name = element.tagName.toLowerCase();
@@ -646,6 +691,7 @@ function inspectHTML(element, options) {
646
691
  }
647
692
  return `${head}${propertyContents}${headClose}${children}${tail}`;
648
693
  }
694
+ __name(inspectHTML, "inspectHTML");
649
695
 
650
696
  // node_modules/loupe/lib/index.js
651
697
  var symbolsSupported = typeof Symbol === "function" && typeof Symbol.for === "function";
@@ -654,10 +700,10 @@ var nodeInspect = Symbol.for("nodejs.util.inspect.custom");
654
700
  var constructorMap = /* @__PURE__ */ new WeakMap();
655
701
  var stringTagMap = {};
656
702
  var baseTypesMap = {
657
- undefined: (value, options) => options.stylize("undefined", "undefined"),
658
- null: (value, options) => options.stylize("null", "null"),
659
- boolean: (value, options) => options.stylize(String(value), "boolean"),
660
- Boolean: (value, options) => options.stylize(String(value), "boolean"),
703
+ undefined: /* @__PURE__ */ __name((value, options) => options.stylize("undefined", "undefined"), "undefined"),
704
+ null: /* @__PURE__ */ __name((value, options) => options.stylize("null", "null"), "null"),
705
+ boolean: /* @__PURE__ */ __name((value, options) => options.stylize(String(value), "boolean"), "boolean"),
706
+ Boolean: /* @__PURE__ */ __name((value, options) => options.stylize(String(value), "boolean"), "Boolean"),
661
707
  number: inspectNumber,
662
708
  Number: inspectNumber,
663
709
  bigint: inspectBigInt,
@@ -676,8 +722,8 @@ var baseTypesMap = {
676
722
  RegExp: inspectRegExp,
677
723
  Promise: promise_default,
678
724
  // WeakSet, WeakMap are totally opaque to us
679
- WeakSet: (value, options) => options.stylize("WeakSet{\u2026}", "special"),
680
- WeakMap: (value, options) => options.stylize("WeakMap{\u2026}", "special"),
725
+ WeakSet: /* @__PURE__ */ __name((value, options) => options.stylize("WeakSet{\u2026}", "special"), "WeakSet"),
726
+ WeakMap: /* @__PURE__ */ __name((value, options) => options.stylize("WeakMap{\u2026}", "special"), "WeakMap"),
681
727
  Arguments: inspectArguments,
682
728
  Int8Array: inspectTypedArray,
683
729
  Uint8Array: inspectTypedArray,
@@ -688,14 +734,14 @@ var baseTypesMap = {
688
734
  Uint32Array: inspectTypedArray,
689
735
  Float32Array: inspectTypedArray,
690
736
  Float64Array: inspectTypedArray,
691
- Generator: () => "",
692
- DataView: () => "",
693
- ArrayBuffer: () => "",
737
+ Generator: /* @__PURE__ */ __name(() => "", "Generator"),
738
+ DataView: /* @__PURE__ */ __name(() => "", "DataView"),
739
+ ArrayBuffer: /* @__PURE__ */ __name(() => "", "ArrayBuffer"),
694
740
  Error: inspectObject2,
695
741
  HTMLCollection: inspectNodeCollection,
696
742
  NodeList: inspectNodeCollection
697
743
  };
698
- var inspectCustom = (value, options, type3) => {
744
+ var inspectCustom = /* @__PURE__ */ __name((value, options, type3) => {
699
745
  if (chaiInspect in value && typeof value[chaiInspect] === "function") {
700
746
  return value[chaiInspect](options);
701
747
  }
@@ -712,7 +758,7 @@ var inspectCustom = (value, options, type3) => {
712
758
  return stringTagMap[type3](value, options);
713
759
  }
714
760
  return "";
715
- };
761
+ }, "inspectCustom");
716
762
  var toString = Object.prototype.toString;
717
763
  function inspect(value, opts = {}) {
718
764
  const options = normaliseOptions(opts, inspect);
@@ -750,6 +796,7 @@ function inspect(value, opts = {}) {
750
796
  }
751
797
  return options.stylize(String(value), type3);
752
798
  }
799
+ __name(inspect, "inspect");
753
800
 
754
801
  // lib/chai/config.js
755
802
  var config = {
@@ -870,6 +917,7 @@ function inspect2(obj, showHidden, depth, colors) {
870
917
  };
871
918
  return inspect(obj, options);
872
919
  }
920
+ __name(inspect2, "inspect");
873
921
 
874
922
  // lib/chai/utils/objDisplay.js
875
923
  function objDisplay(obj) {
@@ -889,6 +937,7 @@ function objDisplay(obj) {
889
937
  return str;
890
938
  }
891
939
  }
940
+ __name(objDisplay, "objDisplay");
892
941
 
893
942
  // lib/chai/utils/getMessage.js
894
943
  function getMessage2(obj, args) {
@@ -909,6 +958,7 @@ function getMessage2(obj, args) {
909
958
  });
910
959
  return flagMsg ? flagMsg + ": " + msg : msg;
911
960
  }
961
+ __name(getMessage2, "getMessage");
912
962
 
913
963
  // lib/chai/utils/transferFlags.js
914
964
  function transferFlags(assertion, object, includeAll) {
@@ -923,6 +973,7 @@ function transferFlags(assertion, object, includeAll) {
923
973
  }
924
974
  }
925
975
  }
976
+ __name(transferFlags, "transferFlags");
926
977
 
927
978
  // node_modules/deep-eql/index.js
928
979
  function type2(obj) {
@@ -940,21 +991,23 @@ function type2(obj) {
940
991
  const sliceEnd = -1;
941
992
  return Object.prototype.toString.call(obj).slice(sliceStart, sliceEnd);
942
993
  }
994
+ __name(type2, "type");
943
995
  function FakeMap() {
944
996
  this._key = "chai/deep-eql__" + Math.random() + Date.now();
945
997
  }
998
+ __name(FakeMap, "FakeMap");
946
999
  FakeMap.prototype = {
947
- get: function get(key) {
1000
+ get: /* @__PURE__ */ __name(function get(key) {
948
1001
  return key[this._key];
949
- },
950
- set: function set(key, value) {
1002
+ }, "get"),
1003
+ set: /* @__PURE__ */ __name(function set(key, value) {
951
1004
  if (Object.isExtensible(key)) {
952
1005
  Object.defineProperty(key, this._key, {
953
1006
  value,
954
1007
  configurable: true
955
1008
  });
956
1009
  }
957
- }
1010
+ }, "set")
958
1011
  };
959
1012
  var MemoizeMap = typeof WeakMap === "function" ? WeakMap : FakeMap;
960
1013
  function memoizeCompare(leftHandOperand, rightHandOperand, memoizeMap) {
@@ -970,6 +1023,7 @@ function memoizeCompare(leftHandOperand, rightHandOperand, memoizeMap) {
970
1023
  }
971
1024
  return null;
972
1025
  }
1026
+ __name(memoizeCompare, "memoizeCompare");
973
1027
  function memoizeSet(leftHandOperand, rightHandOperand, memoizeMap, result) {
974
1028
  if (!memoizeMap || isPrimitive(leftHandOperand) || isPrimitive(rightHandOperand)) {
975
1029
  return;
@@ -983,6 +1037,7 @@ function memoizeSet(leftHandOperand, rightHandOperand, memoizeMap, result) {
983
1037
  memoizeMap.set(leftHandOperand, leftHandMap);
984
1038
  }
985
1039
  }
1040
+ __name(memoizeSet, "memoizeSet");
986
1041
  var deep_eql_default = deepEqual;
987
1042
  function deepEqual(leftHandOperand, rightHandOperand, options) {
988
1043
  if (options && options.comparator) {
@@ -994,6 +1049,7 @@ function deepEqual(leftHandOperand, rightHandOperand, options) {
994
1049
  }
995
1050
  return extensiveDeepEqual(leftHandOperand, rightHandOperand, options);
996
1051
  }
1052
+ __name(deepEqual, "deepEqual");
997
1053
  function simpleEqual(leftHandOperand, rightHandOperand) {
998
1054
  if (leftHandOperand === rightHandOperand) {
999
1055
  return leftHandOperand !== 0 || 1 / leftHandOperand === 1 / rightHandOperand;
@@ -1007,6 +1063,7 @@ function simpleEqual(leftHandOperand, rightHandOperand) {
1007
1063
  }
1008
1064
  return null;
1009
1065
  }
1066
+ __name(simpleEqual, "simpleEqual");
1010
1067
  function extensiveDeepEqual(leftHandOperand, rightHandOperand, options) {
1011
1068
  options = options || {};
1012
1069
  options.memoize = options.memoize === false ? false : options.memoize || new MemoizeMap();
@@ -1040,6 +1097,7 @@ function extensiveDeepEqual(leftHandOperand, rightHandOperand, options) {
1040
1097
  memoizeSet(leftHandOperand, rightHandOperand, options.memoize, result);
1041
1098
  return result;
1042
1099
  }
1100
+ __name(extensiveDeepEqual, "extensiveDeepEqual");
1043
1101
  function extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandType, options) {
1044
1102
  switch (leftHandType) {
1045
1103
  case "String":
@@ -1096,9 +1154,11 @@ function extensiveDeepEqualByType(leftHandOperand, rightHandOperand, leftHandTyp
1096
1154
  return objectEqual(leftHandOperand, rightHandOperand, options);
1097
1155
  }
1098
1156
  }
1157
+ __name(extensiveDeepEqualByType, "extensiveDeepEqualByType");
1099
1158
  function regexpEqual(leftHandOperand, rightHandOperand) {
1100
1159
  return leftHandOperand.toString() === rightHandOperand.toString();
1101
1160
  }
1161
+ __name(regexpEqual, "regexpEqual");
1102
1162
  function entriesEqual(leftHandOperand, rightHandOperand, options) {
1103
1163
  try {
1104
1164
  if (leftHandOperand.size !== rightHandOperand.size) {
@@ -1112,14 +1172,15 @@ function entriesEqual(leftHandOperand, rightHandOperand, options) {
1112
1172
  }
1113
1173
  var leftHandItems = [];
1114
1174
  var rightHandItems = [];
1115
- leftHandOperand.forEach(function gatherEntries(key, value) {
1175
+ leftHandOperand.forEach(/* @__PURE__ */ __name(function gatherEntries(key, value) {
1116
1176
  leftHandItems.push([key, value]);
1117
- });
1118
- rightHandOperand.forEach(function gatherEntries(key, value) {
1177
+ }, "gatherEntries"));
1178
+ rightHandOperand.forEach(/* @__PURE__ */ __name(function gatherEntries(key, value) {
1119
1179
  rightHandItems.push([key, value]);
1120
- });
1180
+ }, "gatherEntries"));
1121
1181
  return iterableEqual(leftHandItems.sort(), rightHandItems.sort(), options);
1122
1182
  }
1183
+ __name(entriesEqual, "entriesEqual");
1123
1184
  function iterableEqual(leftHandOperand, rightHandOperand, options) {
1124
1185
  var length = leftHandOperand.length;
1125
1186
  if (length !== rightHandOperand.length) {
@@ -1136,12 +1197,15 @@ function iterableEqual(leftHandOperand, rightHandOperand, options) {
1136
1197
  }
1137
1198
  return true;
1138
1199
  }
1200
+ __name(iterableEqual, "iterableEqual");
1139
1201
  function generatorEqual(leftHandOperand, rightHandOperand, options) {
1140
1202
  return iterableEqual(getGeneratorEntries(leftHandOperand), getGeneratorEntries(rightHandOperand), options);
1141
1203
  }
1204
+ __name(generatorEqual, "generatorEqual");
1142
1205
  function hasIteratorFunction(target) {
1143
1206
  return typeof Symbol !== "undefined" && typeof target === "object" && typeof Symbol.iterator !== "undefined" && typeof target[Symbol.iterator] === "function";
1144
1207
  }
1208
+ __name(hasIteratorFunction, "hasIteratorFunction");
1145
1209
  function getIteratorEntries(target) {
1146
1210
  if (hasIteratorFunction(target)) {
1147
1211
  try {
@@ -1152,6 +1216,7 @@ function getIteratorEntries(target) {
1152
1216
  }
1153
1217
  return [];
1154
1218
  }
1219
+ __name(getIteratorEntries, "getIteratorEntries");
1155
1220
  function getGeneratorEntries(generator) {
1156
1221
  var generatorResult = generator.next();
1157
1222
  var accumulator = [generatorResult.value];
@@ -1161,6 +1226,7 @@ function getGeneratorEntries(generator) {
1161
1226
  }
1162
1227
  return accumulator;
1163
1228
  }
1229
+ __name(getGeneratorEntries, "getGeneratorEntries");
1164
1230
  function getEnumerableKeys(target) {
1165
1231
  var keys = [];
1166
1232
  for (var key in target) {
@@ -1168,6 +1234,7 @@ function getEnumerableKeys(target) {
1168
1234
  }
1169
1235
  return keys;
1170
1236
  }
1237
+ __name(getEnumerableKeys, "getEnumerableKeys");
1171
1238
  function getEnumerableSymbols(target) {
1172
1239
  var keys = [];
1173
1240
  var allKeys = Object.getOwnPropertySymbols(target);
@@ -1179,6 +1246,7 @@ function getEnumerableSymbols(target) {
1179
1246
  }
1180
1247
  return keys;
1181
1248
  }
1249
+ __name(getEnumerableSymbols, "getEnumerableSymbols");
1182
1250
  function keysEqual(leftHandOperand, rightHandOperand, keys, options) {
1183
1251
  var length = keys.length;
1184
1252
  if (length === 0) {
@@ -1191,6 +1259,7 @@ function keysEqual(leftHandOperand, rightHandOperand, keys, options) {
1191
1259
  }
1192
1260
  return true;
1193
1261
  }
1262
+ __name(keysEqual, "keysEqual");
1194
1263
  function objectEqual(leftHandOperand, rightHandOperand, options) {
1195
1264
  var leftHandKeys = getEnumerableKeys(leftHandOperand);
1196
1265
  var rightHandKeys = getEnumerableKeys(rightHandOperand);
@@ -1216,17 +1285,20 @@ function objectEqual(leftHandOperand, rightHandOperand, options) {
1216
1285
  }
1217
1286
  return false;
1218
1287
  }
1288
+ __name(objectEqual, "objectEqual");
1219
1289
  function isPrimitive(value) {
1220
1290
  return value === null || typeof value !== "object";
1221
1291
  }
1292
+ __name(isPrimitive, "isPrimitive");
1222
1293
  function mapSymbols(arr) {
1223
- return arr.map(function mapSymbol(entry) {
1294
+ return arr.map(/* @__PURE__ */ __name(function mapSymbol(entry) {
1224
1295
  if (typeof entry === "symbol") {
1225
1296
  return entry.toString();
1226
1297
  }
1227
1298
  return entry;
1228
- });
1299
+ }, "mapSymbol"));
1229
1300
  }
1301
+ __name(mapSymbols, "mapSymbols");
1230
1302
 
1231
1303
  // node_modules/pathval/index.js
1232
1304
  function hasProperty(obj, name) {
@@ -1235,6 +1307,7 @@ function hasProperty(obj, name) {
1235
1307
  }
1236
1308
  return name in Object(obj);
1237
1309
  }
1310
+ __name(hasProperty, "hasProperty");
1238
1311
  function parsePath(path) {
1239
1312
  const str = path.replace(/([^\\])\[/g, "$1.[");
1240
1313
  const parts = str.match(/(\\\.|[^.]+?)+/g);
@@ -1253,6 +1326,7 @@ function parsePath(path) {
1253
1326
  return parsed;
1254
1327
  });
1255
1328
  }
1329
+ __name(parsePath, "parsePath");
1256
1330
  function internalGetPathValue(obj, parsed, pathDepth) {
1257
1331
  let temporaryValue = obj;
1258
1332
  let res = null;
@@ -1272,6 +1346,7 @@ function internalGetPathValue(obj, parsed, pathDepth) {
1272
1346
  }
1273
1347
  return res;
1274
1348
  }
1349
+ __name(internalGetPathValue, "internalGetPathValue");
1275
1350
  function getPathInfo(obj, path) {
1276
1351
  const parsed = parsePath(path);
1277
1352
  const last = parsed[parsed.length - 1];
@@ -1283,9 +1358,13 @@ function getPathInfo(obj, path) {
1283
1358
  info.exists = hasProperty(info.parent, info.name);
1284
1359
  return info;
1285
1360
  }
1361
+ __name(getPathInfo, "getPathInfo");
1286
1362
 
1287
1363
  // lib/chai/assertion.js
1288
1364
  var Assertion = class _Assertion {
1365
+ static {
1366
+ __name(this, "Assertion");
1367
+ }
1289
1368
  /** @type {{}} */
1290
1369
  __flags = {};
1291
1370
  /**
@@ -1464,13 +1543,14 @@ var Assertion = class _Assertion {
1464
1543
  function isProxyEnabled() {
1465
1544
  return config.useProxy && typeof Proxy !== "undefined" && typeof Reflect !== "undefined";
1466
1545
  }
1546
+ __name(isProxyEnabled, "isProxyEnabled");
1467
1547
 
1468
1548
  // lib/chai/utils/addProperty.js
1469
1549
  function addProperty(ctx, name, getter) {
1470
1550
  getter = getter === void 0 ? function() {
1471
1551
  } : getter;
1472
1552
  Object.defineProperty(ctx, name, {
1473
- get: function propertyGetter() {
1553
+ get: /* @__PURE__ */ __name(function propertyGetter() {
1474
1554
  if (!isProxyEnabled() && !flag(this, "lockSsfi")) {
1475
1555
  flag(this, "ssfi", propertyGetter);
1476
1556
  }
@@ -1479,10 +1559,11 @@ function addProperty(ctx, name, getter) {
1479
1559
  let newAssertion = new Assertion();
1480
1560
  transferFlags(this, newAssertion);
1481
1561
  return newAssertion;
1482
- },
1562
+ }, "propertyGetter"),
1483
1563
  configurable: true
1484
1564
  });
1485
1565
  }
1566
+ __name(addProperty, "addProperty");
1486
1567
 
1487
1568
  // lib/chai/utils/addLengthGuard.js
1488
1569
  var fnLengthDesc = Object.getOwnPropertyDescriptor(function() {
@@ -1490,7 +1571,7 @@ var fnLengthDesc = Object.getOwnPropertyDescriptor(function() {
1490
1571
  function addLengthGuard(fn, assertionName, isChainable) {
1491
1572
  if (!fnLengthDesc.configurable) return fn;
1492
1573
  Object.defineProperty(fn, "length", {
1493
- get: function() {
1574
+ get: /* @__PURE__ */ __name(function() {
1494
1575
  if (isChainable) {
1495
1576
  throw Error(
1496
1577
  "Invalid Chai property: " + assertionName + '.length. Due to a compatibility issue, "length" cannot directly follow "' + assertionName + '". Use "' + assertionName + '.lengthOf" instead.'
@@ -1499,10 +1580,11 @@ function addLengthGuard(fn, assertionName, isChainable) {
1499
1580
  throw Error(
1500
1581
  "Invalid Chai property: " + assertionName + '.length. See docs for proper usage of "' + assertionName + '".'
1501
1582
  );
1502
- }
1583
+ }, "get")
1503
1584
  });
1504
1585
  return fn;
1505
1586
  }
1587
+ __name(addLengthGuard, "addLengthGuard");
1506
1588
 
1507
1589
  // lib/chai/utils/getProperties.js
1508
1590
  function getProperties(object) {
@@ -1512,6 +1594,7 @@ function getProperties(object) {
1512
1594
  result.push(property);
1513
1595
  }
1514
1596
  }
1597
+ __name(addProperty2, "addProperty");
1515
1598
  let proto = Object.getPrototypeOf(object);
1516
1599
  while (proto !== null) {
1517
1600
  Object.getOwnPropertyNames(proto).forEach(addProperty2);
@@ -1519,13 +1602,14 @@ function getProperties(object) {
1519
1602
  }
1520
1603
  return result;
1521
1604
  }
1605
+ __name(getProperties, "getProperties");
1522
1606
 
1523
1607
  // lib/chai/utils/proxify.js
1524
1608
  var builtins = ["__flags", "__methods", "_obj", "assert"];
1525
1609
  function proxify(obj, nonChainableMethodName) {
1526
1610
  if (!isProxyEnabled()) return obj;
1527
1611
  return new Proxy(obj, {
1528
- get: function proxyGetter(target, property) {
1612
+ get: /* @__PURE__ */ __name(function proxyGetter(target, property) {
1529
1613
  if (typeof property === "string" && config.proxyExcludedKeys.indexOf(property) === -1 && !Reflect.has(target, property)) {
1530
1614
  if (nonChainableMethodName) {
1531
1615
  throw Error(
@@ -1559,9 +1643,10 @@ function proxify(obj, nonChainableMethodName) {
1559
1643
  flag(target, "ssfi", proxyGetter);
1560
1644
  }
1561
1645
  return Reflect.get(target, property);
1562
- }
1646
+ }, "proxyGetter")
1563
1647
  });
1564
1648
  }
1649
+ __name(proxify, "proxify");
1565
1650
  function stringDistanceCapped(strA, strB, cap) {
1566
1651
  if (Math.abs(strA.length - strB.length) >= cap) {
1567
1652
  return cap;
@@ -1590,10 +1675,11 @@ function stringDistanceCapped(strA, strB, cap) {
1590
1675
  }
1591
1676
  return memo[strA.length][strB.length];
1592
1677
  }
1678
+ __name(stringDistanceCapped, "stringDistanceCapped");
1593
1679
 
1594
1680
  // lib/chai/utils/addMethod.js
1595
1681
  function addMethod(ctx, name, method) {
1596
- let methodWrapper = function() {
1682
+ let methodWrapper = /* @__PURE__ */ __name(function() {
1597
1683
  if (!flag(this, "lockSsfi")) {
1598
1684
  flag(this, "ssfi", methodWrapper);
1599
1685
  }
@@ -1602,18 +1688,19 @@ function addMethod(ctx, name, method) {
1602
1688
  let newAssertion = new Assertion();
1603
1689
  transferFlags(this, newAssertion);
1604
1690
  return newAssertion;
1605
- };
1691
+ }, "methodWrapper");
1606
1692
  addLengthGuard(methodWrapper, name, false);
1607
1693
  ctx[name] = proxify(methodWrapper, name);
1608
1694
  }
1695
+ __name(addMethod, "addMethod");
1609
1696
 
1610
1697
  // lib/chai/utils/overwriteProperty.js
1611
1698
  function overwriteProperty(ctx, name, getter) {
1612
- let _get = Object.getOwnPropertyDescriptor(ctx, name), _super = function() {
1613
- };
1699
+ let _get = Object.getOwnPropertyDescriptor(ctx, name), _super = /* @__PURE__ */ __name(function() {
1700
+ }, "_super");
1614
1701
  if (_get && "function" === typeof _get.get) _super = _get.get;
1615
1702
  Object.defineProperty(ctx, name, {
1616
- get: function overwritingPropertyGetter() {
1703
+ get: /* @__PURE__ */ __name(function overwritingPropertyGetter() {
1617
1704
  if (!isProxyEnabled() && !flag(this, "lockSsfi")) {
1618
1705
  flag(this, "ssfi", overwritingPropertyGetter);
1619
1706
  }
@@ -1627,18 +1714,19 @@ function overwriteProperty(ctx, name, getter) {
1627
1714
  let newAssertion = new Assertion();
1628
1715
  transferFlags(this, newAssertion);
1629
1716
  return newAssertion;
1630
- },
1717
+ }, "overwritingPropertyGetter"),
1631
1718
  configurable: true
1632
1719
  });
1633
1720
  }
1721
+ __name(overwriteProperty, "overwriteProperty");
1634
1722
 
1635
1723
  // lib/chai/utils/overwriteMethod.js
1636
1724
  function overwriteMethod(ctx, name, method) {
1637
- let _method = ctx[name], _super = function() {
1725
+ let _method = ctx[name], _super = /* @__PURE__ */ __name(function() {
1638
1726
  throw new Error(name + " is not a function");
1639
- };
1727
+ }, "_super");
1640
1728
  if (_method && "function" === typeof _method) _super = _method;
1641
- let overwritingMethodWrapper = function() {
1729
+ let overwritingMethodWrapper = /* @__PURE__ */ __name(function() {
1642
1730
  if (!flag(this, "lockSsfi")) {
1643
1731
  flag(this, "ssfi", overwritingMethodWrapper);
1644
1732
  }
@@ -1652,15 +1740,16 @@ function overwriteMethod(ctx, name, method) {
1652
1740
  let newAssertion = new Assertion();
1653
1741
  transferFlags(this, newAssertion);
1654
1742
  return newAssertion;
1655
- };
1743
+ }, "overwritingMethodWrapper");
1656
1744
  addLengthGuard(overwritingMethodWrapper, name, false);
1657
1745
  ctx[name] = proxify(overwritingMethodWrapper, name);
1658
1746
  }
1747
+ __name(overwriteMethod, "overwriteMethod");
1659
1748
 
1660
1749
  // lib/chai/utils/addChainableMethod.js
1661
1750
  var canSetPrototype = typeof Object.setPrototypeOf === "function";
1662
- var testFn = function() {
1663
- };
1751
+ var testFn = /* @__PURE__ */ __name(function() {
1752
+ }, "testFn");
1664
1753
  var excludeNames = Object.getOwnPropertyNames(testFn).filter(function(name) {
1665
1754
  let propDesc = Object.getOwnPropertyDescriptor(testFn, name);
1666
1755
  if (typeof propDesc !== "object") return true;
@@ -1670,8 +1759,8 @@ var call = Function.prototype.call;
1670
1759
  var apply = Function.prototype.apply;
1671
1760
  function addChainableMethod(ctx, name, method, chainingBehavior) {
1672
1761
  if (typeof chainingBehavior !== "function") {
1673
- chainingBehavior = function() {
1674
- };
1762
+ chainingBehavior = /* @__PURE__ */ __name(function() {
1763
+ }, "chainingBehavior");
1675
1764
  }
1676
1765
  let chainableBehavior = {
1677
1766
  method,
@@ -1682,9 +1771,9 @@ function addChainableMethod(ctx, name, method, chainingBehavior) {
1682
1771
  }
1683
1772
  ctx.__methods[name] = chainableBehavior;
1684
1773
  Object.defineProperty(ctx, name, {
1685
- get: function chainableMethodGetter() {
1774
+ get: /* @__PURE__ */ __name(function chainableMethodGetter() {
1686
1775
  chainableBehavior.chainingBehavior.call(this);
1687
- let chainableMethodWrapper = function() {
1776
+ let chainableMethodWrapper = /* @__PURE__ */ __name(function() {
1688
1777
  if (!flag(this, "lockSsfi")) {
1689
1778
  flag(this, "ssfi", chainableMethodWrapper);
1690
1779
  }
@@ -1695,7 +1784,7 @@ function addChainableMethod(ctx, name, method, chainingBehavior) {
1695
1784
  let newAssertion = new Assertion();
1696
1785
  transferFlags(this, newAssertion);
1697
1786
  return newAssertion;
1698
- };
1787
+ }, "chainableMethodWrapper");
1699
1788
  addLengthGuard(chainableMethodWrapper, name, true);
1700
1789
  if (canSetPrototype) {
1701
1790
  let prototype = Object.create(this);
@@ -1714,16 +1803,17 @@ function addChainableMethod(ctx, name, method, chainingBehavior) {
1714
1803
  }
1715
1804
  transferFlags(this, chainableMethodWrapper);
1716
1805
  return proxify(chainableMethodWrapper);
1717
- },
1806
+ }, "chainableMethodGetter"),
1718
1807
  configurable: true
1719
1808
  });
1720
1809
  }
1810
+ __name(addChainableMethod, "addChainableMethod");
1721
1811
 
1722
1812
  // lib/chai/utils/overwriteChainableMethod.js
1723
1813
  function overwriteChainableMethod(ctx, name, method, chainingBehavior) {
1724
1814
  let chainableBehavior = ctx.__methods[name];
1725
1815
  let _chainingBehavior = chainableBehavior.chainingBehavior;
1726
- chainableBehavior.chainingBehavior = function overwritingChainableMethodGetter() {
1816
+ chainableBehavior.chainingBehavior = /* @__PURE__ */ __name(function overwritingChainableMethodGetter() {
1727
1817
  let result = chainingBehavior(_chainingBehavior).call(this);
1728
1818
  if (result !== void 0) {
1729
1819
  return result;
@@ -1731,9 +1821,9 @@ function overwriteChainableMethod(ctx, name, method, chainingBehavior) {
1731
1821
  let newAssertion = new Assertion();
1732
1822
  transferFlags(this, newAssertion);
1733
1823
  return newAssertion;
1734
- };
1824
+ }, "overwritingChainableMethodGetter");
1735
1825
  let _method = chainableBehavior.method;
1736
- chainableBehavior.method = function overwritingChainableMethodWrapper() {
1826
+ chainableBehavior.method = /* @__PURE__ */ __name(function overwritingChainableMethodWrapper() {
1737
1827
  let result = method(_method).apply(this, arguments);
1738
1828
  if (result !== void 0) {
1739
1829
  return result;
@@ -1741,13 +1831,15 @@ function overwriteChainableMethod(ctx, name, method, chainingBehavior) {
1741
1831
  let newAssertion = new Assertion();
1742
1832
  transferFlags(this, newAssertion);
1743
1833
  return newAssertion;
1744
- };
1834
+ }, "overwritingChainableMethodWrapper");
1745
1835
  }
1836
+ __name(overwriteChainableMethod, "overwriteChainableMethod");
1746
1837
 
1747
1838
  // lib/chai/utils/compareByInspect.js
1748
1839
  function compareByInspect(a, b) {
1749
1840
  return inspect2(a) < inspect2(b) ? -1 : 1;
1750
1841
  }
1842
+ __name(compareByInspect, "compareByInspect");
1751
1843
 
1752
1844
  // lib/chai/utils/getOwnEnumerablePropertySymbols.js
1753
1845
  function getOwnEnumerablePropertySymbols(obj) {
@@ -1756,11 +1848,13 @@ function getOwnEnumerablePropertySymbols(obj) {
1756
1848
  return Object.getOwnPropertyDescriptor(obj, sym).enumerable;
1757
1849
  });
1758
1850
  }
1851
+ __name(getOwnEnumerablePropertySymbols, "getOwnEnumerablePropertySymbols");
1759
1852
 
1760
1853
  // lib/chai/utils/getOwnEnumerableProperties.js
1761
1854
  function getOwnEnumerableProperties(obj) {
1762
1855
  return Object.keys(obj).concat(getOwnEnumerablePropertySymbols(obj));
1763
1856
  }
1857
+ __name(getOwnEnumerableProperties, "getOwnEnumerableProperties");
1764
1858
 
1765
1859
  // lib/chai/utils/isNaN.js
1766
1860
  var isNaN2 = Number.isNaN;
@@ -1771,6 +1865,7 @@ function isObjectType(obj) {
1771
1865
  let objectTypes = ["Array", "Object", "Function"];
1772
1866
  return objectTypes.indexOf(objectType) !== -1;
1773
1867
  }
1868
+ __name(isObjectType, "isObjectType");
1774
1869
  function getOperator(obj, args) {
1775
1870
  let operator = flag(obj, "operator");
1776
1871
  let negate = flag(obj, "negate");
@@ -1793,17 +1888,21 @@ function getOperator(obj, args) {
1793
1888
  }
1794
1889
  return isObject ? "deepStrictEqual" : "strictEqual";
1795
1890
  }
1891
+ __name(getOperator, "getOperator");
1796
1892
 
1797
1893
  // lib/chai/utils/index.js
1798
1894
  function getName(fn) {
1799
1895
  return fn.name;
1800
1896
  }
1897
+ __name(getName, "getName");
1801
1898
  function isRegExp2(obj) {
1802
1899
  return Object.prototype.toString.call(obj) === "[object RegExp]";
1803
1900
  }
1901
+ __name(isRegExp2, "isRegExp");
1804
1902
  function isNumeric(obj) {
1805
1903
  return ["Number", "BigInt"].includes(type(obj));
1806
1904
  }
1905
+ __name(isNumeric, "isNumeric");
1807
1906
 
1808
1907
  // lib/chai/core/assertions.js
1809
1908
  var { flag: flag2 } = utils_exports;
@@ -1881,14 +1980,17 @@ function an(type3, msg) {
1881
1980
  );
1882
1981
  }
1883
1982
  }
1983
+ __name(an, "an");
1884
1984
  Assertion.addChainableMethod("an", an);
1885
1985
  Assertion.addChainableMethod("a", an);
1886
1986
  function SameValueZero(a, b) {
1887
1987
  return isNaN2(a) && isNaN2(b) || a === b;
1888
1988
  }
1989
+ __name(SameValueZero, "SameValueZero");
1889
1990
  function includeChainingBehavior() {
1890
1991
  flag2(this, "contains", true);
1891
1992
  }
1993
+ __name(includeChainingBehavior, "includeChainingBehavior");
1892
1994
  function include(val, msg) {
1893
1995
  if (msg) flag2(this, "message", msg);
1894
1996
  let obj = flag2(this, "object"), objType = type(obj).toLowerCase(), flagMsg = flag2(this, "message"), negate = flag2(this, "negate"), ssfi = flag2(this, "ssfi"), isDeep = flag2(this, "deep"), descriptor = isDeep ? "deep " : "", isEql = isDeep ? flag2(this, "eql") : SameValueZero;
@@ -1972,6 +2074,7 @@ function include(val, msg) {
1972
2074
  "expected #{this} to not " + descriptor + "include " + inspect2(val)
1973
2075
  );
1974
2076
  }
2077
+ __name(include, "include");
1975
2078
  Assertion.addChainableMethod("include", include, includeChainingBehavior);
1976
2079
  Assertion.addChainableMethod("contain", include, includeChainingBehavior);
1977
2080
  Assertion.addChainableMethod("contains", include, includeChainingBehavior);
@@ -2054,6 +2157,7 @@ function assertExist() {
2054
2157
  "expected #{this} to not exist"
2055
2158
  );
2056
2159
  }
2160
+ __name(assertExist, "assertExist");
2057
2161
  Assertion.addProperty("exist", assertExist);
2058
2162
  Assertion.addProperty("exists", assertExist);
2059
2163
  Assertion.addProperty("empty", function() {
@@ -2103,6 +2207,7 @@ function checkArguments() {
2103
2207
  "expected #{this} to not be arguments"
2104
2208
  );
2105
2209
  }
2210
+ __name(checkArguments, "checkArguments");
2106
2211
  Assertion.addProperty("arguments", checkArguments);
2107
2212
  Assertion.addProperty("Arguments", checkArguments);
2108
2213
  function assertEqual(val, msg) {
@@ -2124,6 +2229,7 @@ function assertEqual(val, msg) {
2124
2229
  );
2125
2230
  }
2126
2231
  }
2232
+ __name(assertEqual, "assertEqual");
2127
2233
  Assertion.addMethod("equal", assertEqual);
2128
2234
  Assertion.addMethod("equals", assertEqual);
2129
2235
  Assertion.addMethod("eq", assertEqual);
@@ -2139,6 +2245,7 @@ function assertEql(obj, msg) {
2139
2245
  true
2140
2246
  );
2141
2247
  }
2248
+ __name(assertEql, "assertEql");
2142
2249
  Assertion.addMethod("eql", assertEql);
2143
2250
  Assertion.addMethod("eqls", assertEql);
2144
2251
  function assertAbove(n, msg) {
@@ -2191,6 +2298,7 @@ function assertAbove(n, msg) {
2191
2298
  );
2192
2299
  }
2193
2300
  }
2301
+ __name(assertAbove, "assertAbove");
2194
2302
  Assertion.addMethod("above", assertAbove);
2195
2303
  Assertion.addMethod("gt", assertAbove);
2196
2304
  Assertion.addMethod("greaterThan", assertAbove);
@@ -2237,6 +2345,7 @@ function assertLeast(n, msg) {
2237
2345
  );
2238
2346
  }
2239
2347
  }
2348
+ __name(assertLeast, "assertLeast");
2240
2349
  Assertion.addMethod("least", assertLeast);
2241
2350
  Assertion.addMethod("gte", assertLeast);
2242
2351
  Assertion.addMethod("greaterThanOrEqual", assertLeast);
@@ -2283,6 +2392,7 @@ function assertBelow(n, msg) {
2283
2392
  );
2284
2393
  }
2285
2394
  }
2395
+ __name(assertBelow, "assertBelow");
2286
2396
  Assertion.addMethod("below", assertBelow);
2287
2397
  Assertion.addMethod("lt", assertBelow);
2288
2398
  Assertion.addMethod("lessThan", assertBelow);
@@ -2329,6 +2439,7 @@ function assertMost(n, msg) {
2329
2439
  );
2330
2440
  }
2331
2441
  }
2442
+ __name(assertMost, "assertMost");
2332
2443
  Assertion.addMethod("most", assertMost);
2333
2444
  Assertion.addMethod("lte", assertMost);
2334
2445
  Assertion.addMethod("lessThanOrEqual", assertMost);
@@ -2401,6 +2512,7 @@ function assertInstanceOf(constructor, msg) {
2401
2512
  "expected #{this} to not be an instance of " + name
2402
2513
  );
2403
2514
  }
2515
+ __name(assertInstanceOf, "assertInstanceOf");
2404
2516
  Assertion.addMethod("instanceof", assertInstanceOf);
2405
2517
  Assertion.addMethod("instanceOf", assertInstanceOf);
2406
2518
  function assertProperty(name, val, msg) {
@@ -2466,11 +2578,13 @@ function assertProperty(name, val, msg) {
2466
2578
  }
2467
2579
  flag2(this, "object", value);
2468
2580
  }
2581
+ __name(assertProperty, "assertProperty");
2469
2582
  Assertion.addMethod("property", assertProperty);
2470
2583
  function assertOwnProperty(_name, _value, _msg) {
2471
2584
  flag2(this, "own", true);
2472
2585
  assertProperty.apply(this, arguments);
2473
2586
  }
2587
+ __name(assertOwnProperty, "assertOwnProperty");
2474
2588
  Assertion.addMethod("ownProperty", assertOwnProperty);
2475
2589
  Assertion.addMethod("haveOwnProperty", assertOwnProperty);
2476
2590
  function assertOwnPropertyDescriptor(name, descriptor, msg) {
@@ -2500,11 +2614,13 @@ function assertOwnPropertyDescriptor(name, descriptor, msg) {
2500
2614
  }
2501
2615
  flag2(this, "object", actualDescriptor);
2502
2616
  }
2617
+ __name(assertOwnPropertyDescriptor, "assertOwnPropertyDescriptor");
2503
2618
  Assertion.addMethod("ownPropertyDescriptor", assertOwnPropertyDescriptor);
2504
2619
  Assertion.addMethod("haveOwnPropertyDescriptor", assertOwnPropertyDescriptor);
2505
2620
  function assertLengthChain() {
2506
2621
  flag2(this, "doLength", true);
2507
2622
  }
2623
+ __name(assertLengthChain, "assertLengthChain");
2508
2624
  function assertLength(n, msg) {
2509
2625
  if (msg) flag2(this, "message", msg);
2510
2626
  let obj = flag2(this, "object"), objType = type(obj).toLowerCase(), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi"), descriptor = "length", itemsCount;
@@ -2526,6 +2642,7 @@ function assertLength(n, msg) {
2526
2642
  itemsCount
2527
2643
  );
2528
2644
  }
2645
+ __name(assertLength, "assertLength");
2529
2646
  Assertion.addChainableMethod("length", assertLength, assertLengthChain);
2530
2647
  Assertion.addChainableMethod("lengthOf", assertLength, assertLengthChain);
2531
2648
  function assertMatch(re, msg) {
@@ -2537,6 +2654,7 @@ function assertMatch(re, msg) {
2537
2654
  "expected #{this} not to match " + re
2538
2655
  );
2539
2656
  }
2657
+ __name(assertMatch, "assertMatch");
2540
2658
  Assertion.addMethod("match", assertMatch);
2541
2659
  Assertion.addMethod("matches", assertMatch);
2542
2660
  Assertion.addMethod("string", function(str, msg) {
@@ -2632,6 +2750,7 @@ function assertKeys(keys) {
2632
2750
  true
2633
2751
  );
2634
2752
  }
2753
+ __name(assertKeys, "assertKeys");
2635
2754
  Assertion.addMethod("keys", assertKeys);
2636
2755
  Assertion.addMethod("key", assertKeys);
2637
2756
  function assertThrows(errorLike, errMsgMatcher, msg) {
@@ -2752,6 +2871,7 @@ function assertThrows(errorLike, errMsgMatcher, msg) {
2752
2871
  }
2753
2872
  flag2(this, "object", caughtErr);
2754
2873
  }
2874
+ __name(assertThrows, "assertThrows");
2755
2875
  Assertion.addMethod("throw", assertThrows);
2756
2876
  Assertion.addMethod("throws", assertThrows);
2757
2877
  Assertion.addMethod("Throw", assertThrows);
@@ -2764,6 +2884,7 @@ function respondTo(method, msg) {
2764
2884
  "expected #{this} to not respond to " + inspect2(method)
2765
2885
  );
2766
2886
  }
2887
+ __name(respondTo, "respondTo");
2767
2888
  Assertion.addMethod("respondTo", respondTo);
2768
2889
  Assertion.addMethod("respondsTo", respondTo);
2769
2890
  Assertion.addProperty("itself", function() {
@@ -2781,6 +2902,7 @@ function satisfy(matcher, msg) {
2781
2902
  result
2782
2903
  );
2783
2904
  }
2905
+ __name(satisfy, "satisfy");
2784
2906
  Assertion.addMethod("satisfy", satisfy);
2785
2907
  Assertion.addMethod("satisfies", satisfy);
2786
2908
  function closeTo(expected, delta, msg) {
@@ -2805,14 +2927,15 @@ function closeTo(expected, delta, msg) {
2805
2927
  );
2806
2928
  }
2807
2929
  new Assertion(expected, flagMsg, ssfi, true).is.numeric;
2808
- const abs = (x) => x < 0n ? -x : x;
2809
- const strip = (number) => parseFloat(parseFloat(number).toPrecision(12));
2930
+ const abs = /* @__PURE__ */ __name((x) => x < 0n ? -x : x, "abs");
2931
+ const strip = /* @__PURE__ */ __name((number) => parseFloat(parseFloat(number).toPrecision(12)), "strip");
2810
2932
  this.assert(
2811
2933
  strip(abs(obj - expected)) <= delta,
2812
2934
  "expected #{this} to be close to " + expected + " +/- " + delta,
2813
2935
  "expected #{this} not to be close to " + expected + " +/- " + delta
2814
2936
  );
2815
2937
  }
2938
+ __name(closeTo, "closeTo");
2816
2939
  Assertion.addMethod("closeTo", closeTo);
2817
2940
  Assertion.addMethod("approximately", closeTo);
2818
2941
  function isSubsetOf(_subset, _superset, cmp, contains, ordered) {
@@ -2837,6 +2960,7 @@ function isSubsetOf(_subset, _superset, cmp, contains, ordered) {
2837
2960
  });
2838
2961
  });
2839
2962
  }
2963
+ __name(isSubsetOf, "isSubsetOf");
2840
2964
  Assertion.addMethod("members", function(subset, msg) {
2841
2965
  if (msg) flag2(this, "message", msg);
2842
2966
  let obj = flag2(this, "object"), flagMsg = flag2(this, "message"), ssfi = flag2(this, "ssfi");
@@ -2910,6 +3034,7 @@ function oneOf(list, msg) {
2910
3034
  }
2911
3035
  }
2912
3036
  }
3037
+ __name(oneOf, "oneOf");
2913
3038
  Assertion.addMethod("oneOf", oneOf);
2914
3039
  function assertChanges(subject, prop, msg) {
2915
3040
  if (msg) flag2(this, "message", msg);
@@ -2937,6 +3062,7 @@ function assertChanges(subject, prop, msg) {
2937
3062
  "expected " + msgObj + " to not change"
2938
3063
  );
2939
3064
  }
3065
+ __name(assertChanges, "assertChanges");
2940
3066
  Assertion.addMethod("change", assertChanges);
2941
3067
  Assertion.addMethod("changes", assertChanges);
2942
3068
  function assertIncreases(subject, prop, msg) {
@@ -2966,6 +3092,7 @@ function assertIncreases(subject, prop, msg) {
2966
3092
  "expected " + msgObj + " to not increase"
2967
3093
  );
2968
3094
  }
3095
+ __name(assertIncreases, "assertIncreases");
2969
3096
  Assertion.addMethod("increase", assertIncreases);
2970
3097
  Assertion.addMethod("increases", assertIncreases);
2971
3098
  function assertDecreases(subject, prop, msg) {
@@ -2995,6 +3122,7 @@ function assertDecreases(subject, prop, msg) {
2995
3122
  "expected " + msgObj + " to not decrease"
2996
3123
  );
2997
3124
  }
3125
+ __name(assertDecreases, "assertDecreases");
2998
3126
  Assertion.addMethod("decrease", assertDecreases);
2999
3127
  Assertion.addMethod("decreases", assertDecreases);
3000
3128
  function assertDelta(delta, msg) {
@@ -3016,6 +3144,7 @@ function assertDelta(delta, msg) {
3016
3144
  "expected " + msgObj + " to not " + behavior + " by " + delta
3017
3145
  );
3018
3146
  }
3147
+ __name(assertDelta, "assertDelta");
3019
3148
  Assertion.addMethod("by", assertDelta);
3020
3149
  Assertion.addProperty("extensible", function() {
3021
3150
  let obj = flag2(this, "object");
@@ -3094,6 +3223,7 @@ function compareSubset(expected, actual) {
3094
3223
  return actualValue === expectedValue;
3095
3224
  });
3096
3225
  }
3226
+ __name(compareSubset, "compareSubset");
3097
3227
  Assertion.addMethod("containSubset", function(expected) {
3098
3228
  const actual = flag(this, "object");
3099
3229
  const showDiff = config.showDiff;
@@ -3111,6 +3241,7 @@ Assertion.addMethod("containSubset", function(expected) {
3111
3241
  function expect(val, message) {
3112
3242
  return new Assertion(val, message);
3113
3243
  }
3244
+ __name(expect, "expect");
3114
3245
  expect.fail = function(actual, expected, message, operator) {
3115
3246
  if (arguments.length < 2) {
3116
3247
  message = actual;
@@ -3141,6 +3272,7 @@ function loadShould() {
3141
3272
  }
3142
3273
  return new Assertion(this, null, shouldGetter);
3143
3274
  }
3275
+ __name(shouldGetter, "shouldGetter");
3144
3276
  function shouldSetter(value) {
3145
3277
  Object.defineProperty(this, "should", {
3146
3278
  value,
@@ -3149,6 +3281,7 @@ function loadShould() {
3149
3281
  writable: true
3150
3282
  });
3151
3283
  }
3284
+ __name(shouldSetter, "shouldSetter");
3152
3285
  Object.defineProperty(Object.prototype, "should", {
3153
3286
  set: shouldSetter,
3154
3287
  get: shouldGetter,
@@ -3194,6 +3327,7 @@ function loadShould() {
3194
3327
  should2.not["throw"] = should2.not["Throw"];
3195
3328
  return should2;
3196
3329
  }
3330
+ __name(loadShould, "loadShould");
3197
3331
  var should = loadShould;
3198
3332
  var Should = loadShould;
3199
3333
 
@@ -3202,6 +3336,7 @@ function assert(express, errmsg) {
3202
3336
  let test2 = new Assertion(null, null, assert, true);
3203
3337
  test2.assert(express, errmsg, "[ negation message unavailable ]");
3204
3338
  }
3339
+ __name(assert, "assert");
3205
3340
  assert.fail = function(actual, expected, message, operator) {
3206
3341
  if (arguments.length < 2) {
3207
3342
  message = actual;
@@ -3992,6 +4127,7 @@ function use(fn) {
3992
4127
  }
3993
4128
  return exports;
3994
4129
  }
4130
+ __name(use, "use");
3995
4131
  export {
3996
4132
  Assertion,
3997
4133
  AssertionError,
package/package.json CHANGED
@@ -24,7 +24,7 @@
24
24
  "Veselin Todorov <hi@vesln.com>",
25
25
  "John Firebaugh <john.firebaugh@gmail.com>"
26
26
  ],
27
- "version": "5.3.2",
27
+ "version": "5.3.3",
28
28
  "repository": {
29
29
  "type": "git",
30
30
  "url": "https://github.com/chaijs/chai"
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "main": "./index.js",
36
36
  "scripts": {
37
- "build": "esbuild --bundle --format=esm --outfile=index.js lib/chai.js",
37
+ "build": "esbuild --bundle --format=esm --keep-names --outfile=index.js lib/chai.js",
38
38
  "prebuild": "npm run clean",
39
39
  "format": "prettier --write lib",
40
40
  "pretest": "npm run lint",