@procore/hammer-test-jest 0.1.0 → 0.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.
- package/dist/transforms/file.test.js +597 -509
- package/dist/transforms/file.test.mjs +597 -509
- package/dist/transforms/reactSvg.test.js +603 -515
- package/dist/transforms/reactSvg.test.mjs +603 -515
- package/package.json +15 -15
|
@@ -272,16 +272,16 @@ var require_collections = __commonJS({
|
|
|
272
272
|
if (list.length) {
|
|
273
273
|
result += config2.spacingOuter;
|
|
274
274
|
const indentationNext = indentation + config2.indent;
|
|
275
|
-
for (let
|
|
275
|
+
for (let i2 = 0; i2 < list.length; i2++) {
|
|
276
276
|
result += indentationNext;
|
|
277
|
-
if (
|
|
277
|
+
if (i2 === config2.maxWidth) {
|
|
278
278
|
result += "\u2026";
|
|
279
279
|
break;
|
|
280
280
|
}
|
|
281
|
-
if (
|
|
282
|
-
result += printer(list[
|
|
281
|
+
if (i2 in list) {
|
|
282
|
+
result += printer(list[i2], config2, indentationNext, depth, refs);
|
|
283
283
|
}
|
|
284
|
-
if (
|
|
284
|
+
if (i2 < list.length - 1) {
|
|
285
285
|
result += `,${config2.spacingInner}`;
|
|
286
286
|
} else if (!config2.min) {
|
|
287
287
|
result += ",";
|
|
@@ -297,12 +297,12 @@ var require_collections = __commonJS({
|
|
|
297
297
|
if (keys2.length) {
|
|
298
298
|
result += config2.spacingOuter;
|
|
299
299
|
const indentationNext = indentation + config2.indent;
|
|
300
|
-
for (let
|
|
301
|
-
const key = keys2[
|
|
300
|
+
for (let i2 = 0; i2 < keys2.length; i2++) {
|
|
301
|
+
const key = keys2[i2];
|
|
302
302
|
const name = printer(key, config2, indentationNext, depth, refs);
|
|
303
303
|
const value = printer(val[key], config2, indentationNext, depth, refs);
|
|
304
304
|
result += `${indentationNext + name}: ${value}`;
|
|
305
|
-
if (
|
|
305
|
+
if (i2 < keys2.length - 1) {
|
|
306
306
|
result += `,${config2.spacingInner}`;
|
|
307
307
|
} else if (!config2.min) {
|
|
308
308
|
result += ",";
|
|
@@ -623,11 +623,11 @@ var require_Immutable = __commonJS({
|
|
|
623
623
|
printer
|
|
624
624
|
)}}`;
|
|
625
625
|
function getRecordEntries(val) {
|
|
626
|
-
let
|
|
626
|
+
let i2 = 0;
|
|
627
627
|
return {
|
|
628
628
|
next() {
|
|
629
|
-
if (
|
|
630
|
-
const key = val._keys[
|
|
629
|
+
if (i2 < val._keys.length) {
|
|
630
|
+
const key = val._keys[i2++];
|
|
631
631
|
return {
|
|
632
632
|
done: false,
|
|
633
633
|
value: [key, val.get(key)]
|
|
@@ -755,62 +755,62 @@ var require_react_is_production_min = __commonJS({
|
|
|
755
755
|
"use strict";
|
|
756
756
|
init_cjs_shims();
|
|
757
757
|
var b2 = Symbol.for("react.element");
|
|
758
|
-
var
|
|
759
|
-
var
|
|
758
|
+
var c2 = Symbol.for("react.portal");
|
|
759
|
+
var d = Symbol.for("react.fragment");
|
|
760
760
|
var e = Symbol.for("react.strict_mode");
|
|
761
|
-
var
|
|
762
|
-
var
|
|
761
|
+
var f2 = Symbol.for("react.profiler");
|
|
762
|
+
var g2 = Symbol.for("react.provider");
|
|
763
763
|
var h = Symbol.for("react.context");
|
|
764
|
-
var
|
|
764
|
+
var k2 = Symbol.for("react.server_context");
|
|
765
765
|
var l = Symbol.for("react.forward_ref");
|
|
766
|
-
var
|
|
766
|
+
var m = Symbol.for("react.suspense");
|
|
767
767
|
var n2 = Symbol.for("react.suspense_list");
|
|
768
|
-
var
|
|
768
|
+
var p = Symbol.for("react.memo");
|
|
769
769
|
var q = Symbol.for("react.lazy");
|
|
770
770
|
var t = Symbol.for("react.offscreen");
|
|
771
771
|
var u2;
|
|
772
772
|
u2 = Symbol.for("react.module.reference");
|
|
773
|
-
function
|
|
773
|
+
function v(a) {
|
|
774
774
|
if ("object" === typeof a && null !== a) {
|
|
775
775
|
var r = a.$$typeof;
|
|
776
776
|
switch (r) {
|
|
777
777
|
case b2:
|
|
778
778
|
switch (a = a.type, a) {
|
|
779
|
-
case
|
|
780
|
-
case
|
|
779
|
+
case d:
|
|
780
|
+
case f2:
|
|
781
781
|
case e:
|
|
782
|
-
case
|
|
782
|
+
case m:
|
|
783
783
|
case n2:
|
|
784
784
|
return a;
|
|
785
785
|
default:
|
|
786
786
|
switch (a = a && a.$$typeof, a) {
|
|
787
|
-
case
|
|
787
|
+
case k2:
|
|
788
788
|
case h:
|
|
789
789
|
case l:
|
|
790
790
|
case q:
|
|
791
|
-
case
|
|
792
|
-
case
|
|
791
|
+
case p:
|
|
792
|
+
case g2:
|
|
793
793
|
return a;
|
|
794
794
|
default:
|
|
795
795
|
return r;
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
|
-
case
|
|
798
|
+
case c2:
|
|
799
799
|
return r;
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
}
|
|
803
803
|
exports2.ContextConsumer = h;
|
|
804
|
-
exports2.ContextProvider =
|
|
804
|
+
exports2.ContextProvider = g2;
|
|
805
805
|
exports2.Element = b2;
|
|
806
806
|
exports2.ForwardRef = l;
|
|
807
|
-
exports2.Fragment =
|
|
807
|
+
exports2.Fragment = d;
|
|
808
808
|
exports2.Lazy = q;
|
|
809
|
-
exports2.Memo =
|
|
810
|
-
exports2.Portal =
|
|
811
|
-
exports2.Profiler =
|
|
809
|
+
exports2.Memo = p;
|
|
810
|
+
exports2.Portal = c2;
|
|
811
|
+
exports2.Profiler = f2;
|
|
812
812
|
exports2.StrictMode = e;
|
|
813
|
-
exports2.Suspense =
|
|
813
|
+
exports2.Suspense = m;
|
|
814
814
|
exports2.SuspenseList = n2;
|
|
815
815
|
exports2.isAsyncMode = function() {
|
|
816
816
|
return false;
|
|
@@ -819,45 +819,45 @@ var require_react_is_production_min = __commonJS({
|
|
|
819
819
|
return false;
|
|
820
820
|
};
|
|
821
821
|
exports2.isContextConsumer = function(a) {
|
|
822
|
-
return
|
|
822
|
+
return v(a) === h;
|
|
823
823
|
};
|
|
824
824
|
exports2.isContextProvider = function(a) {
|
|
825
|
-
return
|
|
825
|
+
return v(a) === g2;
|
|
826
826
|
};
|
|
827
827
|
exports2.isElement = function(a) {
|
|
828
828
|
return "object" === typeof a && null !== a && a.$$typeof === b2;
|
|
829
829
|
};
|
|
830
830
|
exports2.isForwardRef = function(a) {
|
|
831
|
-
return
|
|
831
|
+
return v(a) === l;
|
|
832
832
|
};
|
|
833
833
|
exports2.isFragment = function(a) {
|
|
834
|
-
return
|
|
834
|
+
return v(a) === d;
|
|
835
835
|
};
|
|
836
836
|
exports2.isLazy = function(a) {
|
|
837
|
-
return
|
|
837
|
+
return v(a) === q;
|
|
838
838
|
};
|
|
839
839
|
exports2.isMemo = function(a) {
|
|
840
|
-
return
|
|
840
|
+
return v(a) === p;
|
|
841
841
|
};
|
|
842
842
|
exports2.isPortal = function(a) {
|
|
843
|
-
return
|
|
843
|
+
return v(a) === c2;
|
|
844
844
|
};
|
|
845
845
|
exports2.isProfiler = function(a) {
|
|
846
|
-
return
|
|
846
|
+
return v(a) === f2;
|
|
847
847
|
};
|
|
848
848
|
exports2.isStrictMode = function(a) {
|
|
849
|
-
return
|
|
849
|
+
return v(a) === e;
|
|
850
850
|
};
|
|
851
851
|
exports2.isSuspense = function(a) {
|
|
852
|
-
return
|
|
852
|
+
return v(a) === m;
|
|
853
853
|
};
|
|
854
854
|
exports2.isSuspenseList = function(a) {
|
|
855
|
-
return
|
|
855
|
+
return v(a) === n2;
|
|
856
856
|
};
|
|
857
857
|
exports2.isValidElementType = function(a) {
|
|
858
|
-
return "string" === typeof a || "function" === typeof a || a ===
|
|
858
|
+
return "string" === typeof a || "function" === typeof a || a === d || a === f2 || a === e || a === m || a === n2 || a === t || "object" === typeof a && null !== a && (a.$$typeof === q || a.$$typeof === p || a.$$typeof === g2 || a.$$typeof === h || a.$$typeof === l || a.$$typeof === u2 || void 0 !== a.getModuleId) ? true : false;
|
|
859
859
|
};
|
|
860
|
-
exports2.typeOf =
|
|
860
|
+
exports2.typeOf = v;
|
|
861
861
|
}
|
|
862
862
|
});
|
|
863
863
|
|
|
@@ -1454,10 +1454,10 @@ ${indentationNext}`);
|
|
|
1454
1454
|
return printed;
|
|
1455
1455
|
}
|
|
1456
1456
|
function findPlugin(plugins5, val) {
|
|
1457
|
-
for (let
|
|
1457
|
+
for (let p = 0; p < plugins5.length; p++) {
|
|
1458
1458
|
try {
|
|
1459
|
-
if (plugins5[
|
|
1460
|
-
return plugins5[
|
|
1459
|
+
if (plugins5[p].test(val)) {
|
|
1460
|
+
return plugins5[p];
|
|
1461
1461
|
}
|
|
1462
1462
|
} catch (error) {
|
|
1463
1463
|
throw new PrettyFormatPluginError(error.message, error.stack);
|
|
@@ -1670,11 +1670,11 @@ function inspectList(list, options, inspectItem, separator = ", ") {
|
|
|
1670
1670
|
let output = "";
|
|
1671
1671
|
let peek = "";
|
|
1672
1672
|
let truncated = "";
|
|
1673
|
-
for (let
|
|
1674
|
-
const last =
|
|
1675
|
-
const secondToLast =
|
|
1676
|
-
truncated = `${truncator}(${list.length -
|
|
1677
|
-
const value = list[
|
|
1673
|
+
for (let i2 = 0; i2 < size; i2 += 1) {
|
|
1674
|
+
const last = i2 + 1 === list.length;
|
|
1675
|
+
const secondToLast = i2 + 2 === list.length;
|
|
1676
|
+
truncated = `${truncator}(${list.length - i2})`;
|
|
1677
|
+
const value = list[i2];
|
|
1678
1678
|
options.truncate = originalLength - output.length - (last ? 0 : separator.length);
|
|
1679
1679
|
const string3 = peek || inspectItem(value, options) + (last ? "" : separator);
|
|
1680
1680
|
const nextLength = output.length + string3.length;
|
|
@@ -1685,13 +1685,13 @@ function inspectList(list, options, inspectItem, separator = ", ") {
|
|
|
1685
1685
|
if (!last && !secondToLast && truncatedLength > originalLength) {
|
|
1686
1686
|
break;
|
|
1687
1687
|
}
|
|
1688
|
-
peek = last ? "" : inspectItem(list[
|
|
1688
|
+
peek = last ? "" : inspectItem(list[i2 + 1], options) + (secondToLast ? "" : separator);
|
|
1689
1689
|
if (!last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength) {
|
|
1690
1690
|
break;
|
|
1691
1691
|
}
|
|
1692
1692
|
output += string3;
|
|
1693
1693
|
if (!last && !secondToLast && nextLength + peek.length >= originalLength) {
|
|
1694
|
-
truncated = `${truncator}(${list.length -
|
|
1694
|
+
truncated = `${truncator}(${list.length - i2 - 1})`;
|
|
1695
1695
|
break;
|
|
1696
1696
|
}
|
|
1697
1697
|
truncated = "";
|
|
@@ -1830,11 +1830,11 @@ function inspectTypedArray(array2, options) {
|
|
|
1830
1830
|
if (!array2.length && !nonIndexProperties.length)
|
|
1831
1831
|
return `${name}[]`;
|
|
1832
1832
|
let output = "";
|
|
1833
|
-
for (let
|
|
1834
|
-
const string3 = `${options.stylize(truncate(array2[
|
|
1833
|
+
for (let i2 = 0; i2 < array2.length; i2++) {
|
|
1834
|
+
const string3 = `${options.stylize(truncate(array2[i2], options.truncate), "number")}${i2 === array2.length - 1 ? "" : ", "}`;
|
|
1835
1835
|
options.truncate -= string3.length;
|
|
1836
|
-
if (array2[
|
|
1837
|
-
output += `${truncator}(${array2.length - array2[
|
|
1836
|
+
if (array2[i2] !== array2.length && options.truncate <= 3) {
|
|
1837
|
+
output += `${truncator}(${array2.length - array2[i2] + 1})`;
|
|
1838
1838
|
break;
|
|
1839
1839
|
}
|
|
1840
1840
|
output += string3;
|
|
@@ -1957,7 +1957,7 @@ var init_number = __esm({
|
|
|
1957
1957
|
"use strict";
|
|
1958
1958
|
init_cjs_shims();
|
|
1959
1959
|
init_helpers();
|
|
1960
|
-
isNaN2 = Number.isNaN || ((
|
|
1960
|
+
isNaN2 = Number.isNaN || ((i2) => i2 !== i2);
|
|
1961
1961
|
}
|
|
1962
1962
|
});
|
|
1963
1963
|
|
|
@@ -2459,9 +2459,9 @@ var require_build2 = __commonJS({
|
|
|
2459
2459
|
}
|
|
2460
2460
|
return nCommon;
|
|
2461
2461
|
};
|
|
2462
|
-
var extendPathsF = (
|
|
2462
|
+
var extendPathsF = (d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF) => {
|
|
2463
2463
|
let iF = 0;
|
|
2464
|
-
let kF = -
|
|
2464
|
+
let kF = -d;
|
|
2465
2465
|
let aFirst = aIndexesF[iF];
|
|
2466
2466
|
let aIndexPrev1 = aFirst;
|
|
2467
2467
|
aIndexesF[iF] += countCommonItemsF(
|
|
@@ -2471,9 +2471,9 @@ var require_build2 = __commonJS({
|
|
|
2471
2471
|
bEnd,
|
|
2472
2472
|
isCommon
|
|
2473
2473
|
);
|
|
2474
|
-
const nF =
|
|
2474
|
+
const nF = d < iMaxF ? d : iMaxF;
|
|
2475
2475
|
for (iF += 1, kF += 2; iF <= nF; iF += 1, kF += 2) {
|
|
2476
|
-
if (iF !==
|
|
2476
|
+
if (iF !== d && aIndexPrev1 < aIndexesF[iF]) {
|
|
2477
2477
|
aFirst = aIndexesF[iF];
|
|
2478
2478
|
} else {
|
|
2479
2479
|
aFirst = aIndexPrev1 + 1;
|
|
@@ -2486,9 +2486,9 @@ var require_build2 = __commonJS({
|
|
|
2486
2486
|
}
|
|
2487
2487
|
return iMaxF;
|
|
2488
2488
|
};
|
|
2489
|
-
var extendPathsR = (
|
|
2489
|
+
var extendPathsR = (d, aStart, bStart, bR, isCommon, aIndexesR, iMaxR) => {
|
|
2490
2490
|
let iR = 0;
|
|
2491
|
-
let kR =
|
|
2491
|
+
let kR = d;
|
|
2492
2492
|
let aFirst = aIndexesR[iR];
|
|
2493
2493
|
let aIndexPrev1 = aFirst;
|
|
2494
2494
|
aIndexesR[iR] -= countCommonItemsR(
|
|
@@ -2498,9 +2498,9 @@ var require_build2 = __commonJS({
|
|
|
2498
2498
|
bR + aFirst - kR - 1,
|
|
2499
2499
|
isCommon
|
|
2500
2500
|
);
|
|
2501
|
-
const nR =
|
|
2501
|
+
const nR = d < iMaxR ? d : iMaxR;
|
|
2502
2502
|
for (iR += 1, kR -= 2; iR <= nR; iR += 1, kR -= 2) {
|
|
2503
|
-
if (iR !==
|
|
2503
|
+
if (iR !== d && aIndexesR[iR] < aIndexPrev1) {
|
|
2504
2504
|
aFirst = aIndexesR[iR];
|
|
2505
2505
|
} else {
|
|
2506
2506
|
aFirst = aIndexPrev1 - 1;
|
|
@@ -2519,17 +2519,17 @@ var require_build2 = __commonJS({
|
|
|
2519
2519
|
}
|
|
2520
2520
|
return iMaxR;
|
|
2521
2521
|
};
|
|
2522
|
-
var extendOverlappablePathsF = (
|
|
2522
|
+
var extendOverlappablePathsF = (d, aStart, aEnd, bStart, bEnd, isCommon, aIndexesF, iMaxF, aIndexesR, iMaxR, division) => {
|
|
2523
2523
|
const bF = bStart - aStart;
|
|
2524
2524
|
const aLength = aEnd - aStart;
|
|
2525
2525
|
const bLength = bEnd - bStart;
|
|
2526
2526
|
const baDeltaLength = bLength - aLength;
|
|
2527
|
-
const kMinOverlapF = -baDeltaLength - (
|
|
2528
|
-
const kMaxOverlapF = -baDeltaLength + (
|
|
2527
|
+
const kMinOverlapF = -baDeltaLength - (d - 1);
|
|
2528
|
+
const kMaxOverlapF = -baDeltaLength + (d - 1);
|
|
2529
2529
|
let aIndexPrev1 = NOT_YET_SET;
|
|
2530
|
-
const nF =
|
|
2531
|
-
for (let iF = 0, kF = -
|
|
2532
|
-
const insert2 = iF === 0 || iF !==
|
|
2530
|
+
const nF = d < iMaxF ? d : iMaxF;
|
|
2531
|
+
for (let iF = 0, kF = -d; iF <= nF; iF += 1, kF += 2) {
|
|
2532
|
+
const insert2 = iF === 0 || iF !== d && aIndexPrev1 < aIndexesF[iF];
|
|
2533
2533
|
const aLastPrev = insert2 ? aIndexesF[iF] : aIndexPrev1;
|
|
2534
2534
|
const aFirst = insert2 ? aLastPrev : aLastPrev + 1;
|
|
2535
2535
|
const bFirst = bF + aFirst - kF;
|
|
@@ -2544,7 +2544,7 @@ var require_build2 = __commonJS({
|
|
|
2544
2544
|
aIndexPrev1 = aIndexesF[iF];
|
|
2545
2545
|
aIndexesF[iF] = aLast;
|
|
2546
2546
|
if (kMinOverlapF <= kF && kF <= kMaxOverlapF) {
|
|
2547
|
-
const iR = (
|
|
2547
|
+
const iR = (d - 1 - (kF + baDeltaLength)) / 2;
|
|
2548
2548
|
if (iR <= iMaxR && aIndexesR[iR] - 1 <= aLast) {
|
|
2549
2549
|
const bLastPrev = bF + aLastPrev - (insert2 ? kF + 1 : kF - 1);
|
|
2550
2550
|
const nCommonR = countCommonItemsR(
|
|
@@ -2558,8 +2558,8 @@ var require_build2 = __commonJS({
|
|
|
2558
2558
|
const bIndexPrevFirst = bLastPrev - nCommonR;
|
|
2559
2559
|
const aEndPreceding = aIndexPrevFirst + 1;
|
|
2560
2560
|
const bEndPreceding = bIndexPrevFirst + 1;
|
|
2561
|
-
division.nChangePreceding =
|
|
2562
|
-
if (
|
|
2561
|
+
division.nChangePreceding = d - 1;
|
|
2562
|
+
if (d - 1 === aEndPreceding + bEndPreceding - aStart - bStart) {
|
|
2563
2563
|
division.aEndPreceding = aStart;
|
|
2564
2564
|
division.bEndPreceding = bStart;
|
|
2565
2565
|
} else {
|
|
@@ -2578,8 +2578,8 @@ var require_build2 = __commonJS({
|
|
|
2578
2578
|
}
|
|
2579
2579
|
const aStartFollowing = aLast + 1;
|
|
2580
2580
|
const bStartFollowing = bFirst + nCommonF + 1;
|
|
2581
|
-
division.nChangeFollowing =
|
|
2582
|
-
if (
|
|
2581
|
+
division.nChangeFollowing = d - 1;
|
|
2582
|
+
if (d - 1 === aEnd + bEnd - aStartFollowing - bStartFollowing) {
|
|
2583
2583
|
division.aStartFollowing = aEnd;
|
|
2584
2584
|
division.bStartFollowing = bEnd;
|
|
2585
2585
|
} else {
|
|
@@ -2592,17 +2592,17 @@ var require_build2 = __commonJS({
|
|
|
2592
2592
|
}
|
|
2593
2593
|
return false;
|
|
2594
2594
|
};
|
|
2595
|
-
var extendOverlappablePathsR = (
|
|
2595
|
+
var extendOverlappablePathsR = (d, aStart, aEnd, bStart, bEnd, isCommon, aIndexesF, iMaxF, aIndexesR, iMaxR, division) => {
|
|
2596
2596
|
const bR = bEnd - aEnd;
|
|
2597
2597
|
const aLength = aEnd - aStart;
|
|
2598
2598
|
const bLength = bEnd - bStart;
|
|
2599
2599
|
const baDeltaLength = bLength - aLength;
|
|
2600
|
-
const kMinOverlapR = baDeltaLength -
|
|
2601
|
-
const kMaxOverlapR = baDeltaLength +
|
|
2600
|
+
const kMinOverlapR = baDeltaLength - d;
|
|
2601
|
+
const kMaxOverlapR = baDeltaLength + d;
|
|
2602
2602
|
let aIndexPrev1 = NOT_YET_SET;
|
|
2603
|
-
const nR =
|
|
2604
|
-
for (let iR = 0, kR =
|
|
2605
|
-
const insert2 = iR === 0 || iR !==
|
|
2603
|
+
const nR = d < iMaxR ? d : iMaxR;
|
|
2604
|
+
for (let iR = 0, kR = d; iR <= nR; iR += 1, kR -= 2) {
|
|
2605
|
+
const insert2 = iR === 0 || iR !== d && aIndexesR[iR] < aIndexPrev1;
|
|
2606
2606
|
const aLastPrev = insert2 ? aIndexesR[iR] : aIndexPrev1;
|
|
2607
2607
|
const aFirst = insert2 ? aLastPrev : aLastPrev - 1;
|
|
2608
2608
|
const bFirst = bR + aFirst - kR;
|
|
@@ -2617,11 +2617,11 @@ var require_build2 = __commonJS({
|
|
|
2617
2617
|
aIndexPrev1 = aIndexesR[iR];
|
|
2618
2618
|
aIndexesR[iR] = aLast;
|
|
2619
2619
|
if (kMinOverlapR <= kR && kR <= kMaxOverlapR) {
|
|
2620
|
-
const iF = (
|
|
2620
|
+
const iF = (d + (kR - baDeltaLength)) / 2;
|
|
2621
2621
|
if (iF <= iMaxF && aLast - 1 <= aIndexesF[iF]) {
|
|
2622
2622
|
const bLast = bFirst - nCommonR;
|
|
2623
|
-
division.nChangePreceding =
|
|
2624
|
-
if (
|
|
2623
|
+
division.nChangePreceding = d;
|
|
2624
|
+
if (d === aLast + bLast - aStart - bStart) {
|
|
2625
2625
|
division.aEndPreceding = aStart;
|
|
2626
2626
|
division.bEndPreceding = bStart;
|
|
2627
2627
|
} else {
|
|
@@ -2633,8 +2633,8 @@ var require_build2 = __commonJS({
|
|
|
2633
2633
|
division.aCommonPreceding = aLast;
|
|
2634
2634
|
division.bCommonPreceding = bLast;
|
|
2635
2635
|
}
|
|
2636
|
-
division.nChangeFollowing =
|
|
2637
|
-
if (
|
|
2636
|
+
division.nChangeFollowing = d - 1;
|
|
2637
|
+
if (d === 1) {
|
|
2638
2638
|
division.nCommonFollowing = 0;
|
|
2639
2639
|
division.aStartFollowing = aEnd;
|
|
2640
2640
|
division.bStartFollowing = bEnd;
|
|
@@ -2654,7 +2654,7 @@ var require_build2 = __commonJS({
|
|
|
2654
2654
|
}
|
|
2655
2655
|
const aStartFollowing = aLastPrev + nCommonF;
|
|
2656
2656
|
const bStartFollowing = bLastPrev + nCommonF;
|
|
2657
|
-
if (
|
|
2657
|
+
if (d - 1 === aEnd + bEnd - aStartFollowing - bStartFollowing) {
|
|
2658
2658
|
division.aStartFollowing = aEnd;
|
|
2659
2659
|
division.bStartFollowing = bEnd;
|
|
2660
2660
|
} else {
|
|
@@ -2681,15 +2681,15 @@ var require_build2 = __commonJS({
|
|
|
2681
2681
|
if (baDeltaLength % 2 === 0) {
|
|
2682
2682
|
const dMin = (nChange || baDeltaLength) / 2;
|
|
2683
2683
|
const dMax = (aLength + bLength) / 2;
|
|
2684
|
-
for (let
|
|
2685
|
-
iMaxF = extendPathsF(
|
|
2686
|
-
if (
|
|
2687
|
-
iMaxR = extendPathsR(
|
|
2684
|
+
for (let d = 1; d <= dMax; d += 1) {
|
|
2685
|
+
iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);
|
|
2686
|
+
if (d < dMin) {
|
|
2687
|
+
iMaxR = extendPathsR(d, aStart, bStart, bR, isCommon, aIndexesR, iMaxR);
|
|
2688
2688
|
} else if (
|
|
2689
2689
|
// If a reverse path overlaps a forward path in the same diagonal,
|
|
2690
2690
|
// return a division of the index intervals at the middle change.
|
|
2691
2691
|
extendOverlappablePathsR(
|
|
2692
|
-
|
|
2692
|
+
d,
|
|
2693
2693
|
aStart,
|
|
2694
2694
|
aEnd,
|
|
2695
2695
|
bStart,
|
|
@@ -2708,11 +2708,11 @@ var require_build2 = __commonJS({
|
|
|
2708
2708
|
} else {
|
|
2709
2709
|
const dMin = ((nChange || baDeltaLength) + 1) / 2;
|
|
2710
2710
|
const dMax = (aLength + bLength + 1) / 2;
|
|
2711
|
-
let
|
|
2712
|
-
iMaxF = extendPathsF(
|
|
2713
|
-
for (
|
|
2711
|
+
let d = 1;
|
|
2712
|
+
iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);
|
|
2713
|
+
for (d += 1; d <= dMax; d += 1) {
|
|
2714
2714
|
iMaxR = extendPathsR(
|
|
2715
|
-
|
|
2715
|
+
d - 1,
|
|
2716
2716
|
aStart,
|
|
2717
2717
|
bStart,
|
|
2718
2718
|
bR,
|
|
@@ -2720,13 +2720,13 @@ var require_build2 = __commonJS({
|
|
|
2720
2720
|
aIndexesR,
|
|
2721
2721
|
iMaxR
|
|
2722
2722
|
);
|
|
2723
|
-
if (
|
|
2724
|
-
iMaxF = extendPathsF(
|
|
2723
|
+
if (d < dMin) {
|
|
2724
|
+
iMaxF = extendPathsF(d, aEnd, bEnd, bF, isCommon, aIndexesF, iMaxF);
|
|
2725
2725
|
} else if (
|
|
2726
2726
|
// If a forward path overlaps a reverse path in the same diagonal,
|
|
2727
2727
|
// return a division of the index intervals at the middle change.
|
|
2728
2728
|
extendOverlappablePathsF(
|
|
2729
|
-
|
|
2729
|
+
d,
|
|
2730
2730
|
aStart,
|
|
2731
2731
|
aEnd,
|
|
2732
2732
|
bStart,
|
|
@@ -2926,9 +2926,9 @@ var require_assertion_error = __commonJS({
|
|
|
2926
2926
|
});
|
|
2927
2927
|
}
|
|
2928
2928
|
return function extendExclude() {
|
|
2929
|
-
var args = [].slice.call(arguments),
|
|
2930
|
-
for (;
|
|
2931
|
-
excludeProps(res, args[
|
|
2929
|
+
var args = [].slice.call(arguments), i2 = 0, res = {};
|
|
2930
|
+
for (; i2 < args.length; i2++) {
|
|
2931
|
+
excludeProps(res, args[i2]);
|
|
2932
2932
|
}
|
|
2933
2933
|
return res;
|
|
2934
2934
|
};
|
|
@@ -2998,15 +2998,15 @@ var require_pathval = __commonJS({
|
|
|
2998
2998
|
var temporaryValue = obj;
|
|
2999
2999
|
var res = null;
|
|
3000
3000
|
pathDepth = typeof pathDepth === "undefined" ? parsed.length : pathDepth;
|
|
3001
|
-
for (var
|
|
3002
|
-
var part = parsed[
|
|
3001
|
+
for (var i2 = 0; i2 < pathDepth; i2++) {
|
|
3002
|
+
var part = parsed[i2];
|
|
3003
3003
|
if (temporaryValue) {
|
|
3004
3004
|
if (typeof part.p === "undefined") {
|
|
3005
3005
|
temporaryValue = temporaryValue[part.i];
|
|
3006
3006
|
} else {
|
|
3007
3007
|
temporaryValue = temporaryValue[part.p];
|
|
3008
3008
|
}
|
|
3009
|
-
if (
|
|
3009
|
+
if (i2 === pathDepth - 1) {
|
|
3010
3010
|
res = temporaryValue;
|
|
3011
3011
|
}
|
|
3012
3012
|
}
|
|
@@ -3017,11 +3017,11 @@ var require_pathval = __commonJS({
|
|
|
3017
3017
|
var tempObj = obj;
|
|
3018
3018
|
var pathDepth = parsed.length;
|
|
3019
3019
|
var part = null;
|
|
3020
|
-
for (var
|
|
3020
|
+
for (var i2 = 0; i2 < pathDepth; i2++) {
|
|
3021
3021
|
var propName = null;
|
|
3022
3022
|
var propVal = null;
|
|
3023
|
-
part = parsed[
|
|
3024
|
-
if (
|
|
3023
|
+
part = parsed[i2];
|
|
3024
|
+
if (i2 === pathDepth - 1) {
|
|
3025
3025
|
propName = typeof part.p === "undefined" ? part.i : part.p;
|
|
3026
3026
|
tempObj[propName] = val;
|
|
3027
3027
|
} else if (typeof part.p !== "undefined" && tempObj[part.p]) {
|
|
@@ -3029,7 +3029,7 @@ var require_pathval = __commonJS({
|
|
|
3029
3029
|
} else if (typeof part.i !== "undefined" && tempObj[part.i]) {
|
|
3030
3030
|
tempObj = tempObj[part.i];
|
|
3031
3031
|
} else {
|
|
3032
|
-
var next = parsed[
|
|
3032
|
+
var next = parsed[i2 + 1];
|
|
3033
3033
|
propName = typeof part.p === "undefined" ? part.i : part.p;
|
|
3034
3034
|
propVal = typeof next.p === "undefined" ? [] : {};
|
|
3035
3035
|
tempObj[propName] = propVal;
|
|
@@ -3705,8 +3705,8 @@ var require_deep_eql = __commonJS({
|
|
|
3705
3705
|
function getEnumerableSymbols(target) {
|
|
3706
3706
|
var keys2 = [];
|
|
3707
3707
|
var allKeys = Object.getOwnPropertySymbols(target);
|
|
3708
|
-
for (var
|
|
3709
|
-
var key = allKeys[
|
|
3708
|
+
for (var i2 = 0; i2 < allKeys.length; i2 += 1) {
|
|
3709
|
+
var key = allKeys[i2];
|
|
3710
3710
|
if (Object.getOwnPropertyDescriptor(target, key).enumerable) {
|
|
3711
3711
|
keys2.push(key);
|
|
3712
3712
|
}
|
|
@@ -3718,8 +3718,8 @@ var require_deep_eql = __commonJS({
|
|
|
3718
3718
|
if (length === 0) {
|
|
3719
3719
|
return true;
|
|
3720
3720
|
}
|
|
3721
|
-
for (var
|
|
3722
|
-
if (deepEqual(leftHandOperand[keys2[
|
|
3721
|
+
for (var i2 = 0; i2 < length; i2 += 1) {
|
|
3722
|
+
if (deepEqual(leftHandOperand[keys2[i2]], rightHandOperand[keys2[i2]], options) === false) {
|
|
3723
3723
|
return false;
|
|
3724
3724
|
}
|
|
3725
3725
|
}
|
|
@@ -3907,24 +3907,24 @@ var require_proxify = __commonJS({
|
|
|
3907
3907
|
return cap;
|
|
3908
3908
|
}
|
|
3909
3909
|
var memo = [];
|
|
3910
|
-
for (var
|
|
3911
|
-
memo[
|
|
3912
|
-
memo[
|
|
3910
|
+
for (var i2 = 0; i2 <= strA.length; i2++) {
|
|
3911
|
+
memo[i2] = Array(strB.length + 1).fill(0);
|
|
3912
|
+
memo[i2][0] = i2;
|
|
3913
3913
|
}
|
|
3914
3914
|
for (var j = 0; j < strB.length; j++) {
|
|
3915
3915
|
memo[0][j] = j;
|
|
3916
3916
|
}
|
|
3917
|
-
for (var
|
|
3918
|
-
var ch = strA.charCodeAt(
|
|
3917
|
+
for (var i2 = 1; i2 <= strA.length; i2++) {
|
|
3918
|
+
var ch = strA.charCodeAt(i2 - 1);
|
|
3919
3919
|
for (var j = 1; j <= strB.length; j++) {
|
|
3920
|
-
if (Math.abs(
|
|
3921
|
-
memo[
|
|
3920
|
+
if (Math.abs(i2 - j) >= cap) {
|
|
3921
|
+
memo[i2][j] = cap;
|
|
3922
3922
|
continue;
|
|
3923
3923
|
}
|
|
3924
|
-
memo[
|
|
3925
|
-
memo[
|
|
3926
|
-
memo[
|
|
3927
|
-
memo[
|
|
3924
|
+
memo[i2][j] = Math.min(
|
|
3925
|
+
memo[i2 - 1][j] + 1,
|
|
3926
|
+
memo[i2][j - 1] + 1,
|
|
3927
|
+
memo[i2 - 1][j - 1] + (ch === strB.charCodeAt(j - 1) ? 0 : 1)
|
|
3928
3928
|
);
|
|
3929
3929
|
}
|
|
3930
3930
|
}
|
|
@@ -6335,9 +6335,9 @@ function encode(decoded) {
|
|
|
6335
6335
|
const sub = buf.subarray(0, subLength);
|
|
6336
6336
|
let pos = 0;
|
|
6337
6337
|
let out = "";
|
|
6338
|
-
for (let
|
|
6339
|
-
const line = decoded[
|
|
6340
|
-
if (
|
|
6338
|
+
for (let i2 = 0; i2 < decoded.length; i2++) {
|
|
6339
|
+
const line = decoded[i2];
|
|
6340
|
+
if (i2 > 0) {
|
|
6341
6341
|
if (pos === bufLength) {
|
|
6342
6342
|
out += td.decode(buf);
|
|
6343
6343
|
pos = 0;
|
|
@@ -6393,10 +6393,10 @@ var init_sourcemap_codec = __esm({
|
|
|
6393
6393
|
chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
6394
6394
|
intToChar = new Uint8Array(64);
|
|
6395
6395
|
charToInt = new Uint8Array(128);
|
|
6396
|
-
for (let
|
|
6397
|
-
const
|
|
6398
|
-
intToChar[
|
|
6399
|
-
charToInt[
|
|
6396
|
+
for (let i2 = 0; i2 < chars.length; i2++) {
|
|
6397
|
+
const c2 = chars.charCodeAt(i2);
|
|
6398
|
+
intToChar[i2] = c2;
|
|
6399
|
+
charToInt[c2] = i2;
|
|
6400
6400
|
}
|
|
6401
6401
|
td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
|
|
6402
6402
|
decode(buf) {
|
|
@@ -6406,8 +6406,8 @@ var init_sourcemap_codec = __esm({
|
|
|
6406
6406
|
} : {
|
|
6407
6407
|
decode(buf) {
|
|
6408
6408
|
let out = "";
|
|
6409
|
-
for (let
|
|
6410
|
-
out += String.fromCharCode(buf[
|
|
6409
|
+
for (let i2 = 0; i2 < buf.length; i2++) {
|
|
6410
|
+
out += String.fromCharCode(buf[i2]);
|
|
6411
6411
|
}
|
|
6412
6412
|
return out;
|
|
6413
6413
|
}
|
|
@@ -6423,8 +6423,8 @@ __export(magic_string_es_exports, {
|
|
|
6423
6423
|
default: () => MagicString
|
|
6424
6424
|
});
|
|
6425
6425
|
function getBtoa() {
|
|
6426
|
-
if (typeof
|
|
6427
|
-
return (str) =>
|
|
6426
|
+
if (typeof globalThis !== "undefined" && typeof globalThis.btoa === "function") {
|
|
6427
|
+
return (str) => globalThis.btoa(unescape(encodeURIComponent(str)));
|
|
6428
6428
|
} else if (typeof Buffer === "function") {
|
|
6429
6429
|
return (str) => Buffer.from(str, "utf-8").toString("base64");
|
|
6430
6430
|
} else {
|
|
@@ -6458,9 +6458,9 @@ function getRelativePath(from, to) {
|
|
|
6458
6458
|
toParts.shift();
|
|
6459
6459
|
}
|
|
6460
6460
|
if (fromParts.length) {
|
|
6461
|
-
let
|
|
6462
|
-
while (
|
|
6463
|
-
fromParts[
|
|
6461
|
+
let i2 = fromParts.length;
|
|
6462
|
+
while (i2--)
|
|
6463
|
+
fromParts[i2] = "..";
|
|
6464
6464
|
}
|
|
6465
6465
|
return fromParts.concat(toParts).join("/");
|
|
6466
6466
|
}
|
|
@@ -6470,22 +6470,22 @@ function isObject2(thing) {
|
|
|
6470
6470
|
function getLocator(source) {
|
|
6471
6471
|
const originalLines = source.split("\n");
|
|
6472
6472
|
const lineOffsets = [];
|
|
6473
|
-
for (let
|
|
6473
|
+
for (let i2 = 0, pos = 0; i2 < originalLines.length; i2++) {
|
|
6474
6474
|
lineOffsets.push(pos);
|
|
6475
|
-
pos += originalLines[
|
|
6475
|
+
pos += originalLines[i2].length + 1;
|
|
6476
6476
|
}
|
|
6477
6477
|
return function locate(index) {
|
|
6478
|
-
let
|
|
6478
|
+
let i2 = 0;
|
|
6479
6479
|
let j = lineOffsets.length;
|
|
6480
|
-
while (
|
|
6481
|
-
const
|
|
6482
|
-
if (index < lineOffsets[
|
|
6483
|
-
j =
|
|
6480
|
+
while (i2 < j) {
|
|
6481
|
+
const m = i2 + j >> 1;
|
|
6482
|
+
if (index < lineOffsets[m]) {
|
|
6483
|
+
j = m;
|
|
6484
6484
|
} else {
|
|
6485
|
-
|
|
6485
|
+
i2 = m + 1;
|
|
6486
6486
|
}
|
|
6487
6487
|
}
|
|
6488
|
-
const line =
|
|
6488
|
+
const line = i2 - 1;
|
|
6489
6489
|
const column = index - lineOffsets[line];
|
|
6490
6490
|
return { line, column };
|
|
6491
6491
|
};
|
|
@@ -6570,6 +6570,15 @@ var init_magic_string_es = __esm({
|
|
|
6570
6570
|
prependRight(content) {
|
|
6571
6571
|
this.intro = content + this.intro;
|
|
6572
6572
|
}
|
|
6573
|
+
reset() {
|
|
6574
|
+
this.intro = "";
|
|
6575
|
+
this.outro = "";
|
|
6576
|
+
if (this.edited) {
|
|
6577
|
+
this.content = this.original;
|
|
6578
|
+
this.storeName = false;
|
|
6579
|
+
this.edited = false;
|
|
6580
|
+
}
|
|
6581
|
+
}
|
|
6573
6582
|
split(index) {
|
|
6574
6583
|
const sliceIndex = index - this.start;
|
|
6575
6584
|
const originalBefore = this.original.slice(0, sliceIndex);
|
|
@@ -6670,9 +6679,10 @@ var init_magic_string_es = __esm({
|
|
|
6670
6679
|
}
|
|
6671
6680
|
addEdit(sourceIndex, content, loc, nameIndex) {
|
|
6672
6681
|
if (content.length) {
|
|
6682
|
+
const contentLengthMinusOne = content.length - 1;
|
|
6673
6683
|
let contentLineEnd = content.indexOf("\n", 0);
|
|
6674
6684
|
let previousContentLineEnd = -1;
|
|
6675
|
-
while (contentLineEnd >= 0) {
|
|
6685
|
+
while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) {
|
|
6676
6686
|
const segment2 = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
|
|
6677
6687
|
if (nameIndex >= 0) {
|
|
6678
6688
|
segment2.push(nameIndex);
|
|
@@ -6738,7 +6748,7 @@ var init_magic_string_es = __esm({
|
|
|
6738
6748
|
return;
|
|
6739
6749
|
const lines = str.split("\n");
|
|
6740
6750
|
if (lines.length > 1) {
|
|
6741
|
-
for (let
|
|
6751
|
+
for (let i2 = 0; i2 < lines.length - 1; i2++) {
|
|
6742
6752
|
this.generatedCodeLine++;
|
|
6743
6753
|
this.raw[this.generatedCodeLine] = this.rawSegments = [];
|
|
6744
6754
|
}
|
|
@@ -6903,8 +6913,8 @@ var init_magic_string_es = __esm({
|
|
|
6903
6913
|
if (options.exclude) {
|
|
6904
6914
|
const exclusions = typeof options.exclude[0] === "number" ? [options.exclude] : options.exclude;
|
|
6905
6915
|
exclusions.forEach((exclusion) => {
|
|
6906
|
-
for (let
|
|
6907
|
-
isExcluded[
|
|
6916
|
+
for (let i2 = exclusion[0]; i2 < exclusion[1]; i2 += 1) {
|
|
6917
|
+
isExcluded[i2] = true;
|
|
6908
6918
|
}
|
|
6909
6919
|
});
|
|
6910
6920
|
}
|
|
@@ -7122,6 +7132,26 @@ var init_magic_string_es = __esm({
|
|
|
7122
7132
|
}
|
|
7123
7133
|
return this;
|
|
7124
7134
|
}
|
|
7135
|
+
reset(start, end) {
|
|
7136
|
+
while (start < 0)
|
|
7137
|
+
start += this.original.length;
|
|
7138
|
+
while (end < 0)
|
|
7139
|
+
end += this.original.length;
|
|
7140
|
+
if (start === end)
|
|
7141
|
+
return this;
|
|
7142
|
+
if (start < 0 || end > this.original.length)
|
|
7143
|
+
throw new Error("Character is out of bounds");
|
|
7144
|
+
if (start > end)
|
|
7145
|
+
throw new Error("end must be greater than start");
|
|
7146
|
+
this._split(start);
|
|
7147
|
+
this._split(end);
|
|
7148
|
+
let chunk = this.byStart[start];
|
|
7149
|
+
while (chunk) {
|
|
7150
|
+
chunk.reset();
|
|
7151
|
+
chunk = end > chunk.end ? this.byStart[chunk.end] : null;
|
|
7152
|
+
}
|
|
7153
|
+
return this;
|
|
7154
|
+
}
|
|
7125
7155
|
lastChar() {
|
|
7126
7156
|
if (this.outro.length)
|
|
7127
7157
|
return this.outro[this.outro.length - 1];
|
|
@@ -7329,15 +7359,15 @@ var init_magic_string_es = __esm({
|
|
|
7329
7359
|
_replaceRegexp(searchValue, replacement) {
|
|
7330
7360
|
function getReplacement(match, str) {
|
|
7331
7361
|
if (typeof replacement === "string") {
|
|
7332
|
-
return replacement.replace(/\$(\$|&|\d+)/g, (_,
|
|
7333
|
-
if (
|
|
7362
|
+
return replacement.replace(/\$(\$|&|\d+)/g, (_, i2) => {
|
|
7363
|
+
if (i2 === "$")
|
|
7334
7364
|
return "$";
|
|
7335
|
-
if (
|
|
7365
|
+
if (i2 === "&")
|
|
7336
7366
|
return match[0];
|
|
7337
|
-
const num = +
|
|
7367
|
+
const num = +i2;
|
|
7338
7368
|
if (num < match.length)
|
|
7339
|
-
return match[+
|
|
7340
|
-
return `$${
|
|
7369
|
+
return match[+i2];
|
|
7370
|
+
return `$${i2}`;
|
|
7341
7371
|
});
|
|
7342
7372
|
} else {
|
|
7343
7373
|
return replacement(...match, match.index, str, match.groups);
|
|
@@ -7483,8 +7513,8 @@ var init_magic_string_es = __esm({
|
|
|
7483
7513
|
if (this.intro) {
|
|
7484
7514
|
mappings.advance(this.intro);
|
|
7485
7515
|
}
|
|
7486
|
-
this.sources.forEach((source,
|
|
7487
|
-
if (
|
|
7516
|
+
this.sources.forEach((source, i2) => {
|
|
7517
|
+
if (i2 > 0) {
|
|
7488
7518
|
mappings.advance(this.separator);
|
|
7489
7519
|
}
|
|
7490
7520
|
const sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;
|
|
@@ -7567,9 +7597,9 @@ var init_magic_string_es = __esm({
|
|
|
7567
7597
|
if (indentStr === "")
|
|
7568
7598
|
return this;
|
|
7569
7599
|
let trailingNewline = !this.intro || this.intro.slice(-1) === "\n";
|
|
7570
|
-
this.sources.forEach((source,
|
|
7600
|
+
this.sources.forEach((source, i2) => {
|
|
7571
7601
|
const separator = source.separator !== void 0 ? source.separator : this.separator;
|
|
7572
|
-
const indentStart = trailingNewline ||
|
|
7602
|
+
const indentStart = trailingNewline || i2 > 0 && /\r?\n$/.test(separator);
|
|
7573
7603
|
source.content.indent(indentStr, {
|
|
7574
7604
|
exclude: source.indentExclusionRanges,
|
|
7575
7605
|
indentStart
|
|
@@ -7589,9 +7619,9 @@ var init_magic_string_es = __esm({
|
|
|
7589
7619
|
return this;
|
|
7590
7620
|
}
|
|
7591
7621
|
toString() {
|
|
7592
|
-
const body = this.sources.map((source,
|
|
7622
|
+
const body = this.sources.map((source, i2) => {
|
|
7593
7623
|
const separator = source.separator !== void 0 ? source.separator : this.separator;
|
|
7594
|
-
const str = (
|
|
7624
|
+
const str = (i2 > 0 ? separator : "") + source.content.toString();
|
|
7595
7625
|
return str;
|
|
7596
7626
|
}).join("");
|
|
7597
7627
|
return this.intro + body;
|
|
@@ -7620,9 +7650,9 @@ var init_magic_string_es = __esm({
|
|
|
7620
7650
|
this.intro = this.intro.replace(rx, "");
|
|
7621
7651
|
if (!this.intro) {
|
|
7622
7652
|
let source;
|
|
7623
|
-
let
|
|
7653
|
+
let i2 = 0;
|
|
7624
7654
|
do {
|
|
7625
|
-
source = this.sources[
|
|
7655
|
+
source = this.sources[i2++];
|
|
7626
7656
|
if (!source) {
|
|
7627
7657
|
break;
|
|
7628
7658
|
}
|
|
@@ -7633,9 +7663,9 @@ var init_magic_string_es = __esm({
|
|
|
7633
7663
|
trimEnd(charType) {
|
|
7634
7664
|
const rx = new RegExp((charType || "\\s") + "+$");
|
|
7635
7665
|
let source;
|
|
7636
|
-
let
|
|
7666
|
+
let i2 = this.sources.length - 1;
|
|
7637
7667
|
do {
|
|
7638
|
-
source = this.sources[
|
|
7668
|
+
source = this.sources[i2--];
|
|
7639
7669
|
if (!source) {
|
|
7640
7670
|
this.intro = this.intro.replace(rx, "");
|
|
7641
7671
|
break;
|
|
@@ -7718,34 +7748,34 @@ function deepClone(val, options = defaultCloneOptions) {
|
|
|
7718
7748
|
return clone(val, seen, options);
|
|
7719
7749
|
}
|
|
7720
7750
|
function clone(val, seen, options = defaultCloneOptions) {
|
|
7721
|
-
let
|
|
7751
|
+
let k2, out;
|
|
7722
7752
|
if (seen.has(val))
|
|
7723
7753
|
return seen.get(val);
|
|
7724
7754
|
if (Array.isArray(val)) {
|
|
7725
|
-
out = Array(
|
|
7755
|
+
out = Array(k2 = val.length);
|
|
7726
7756
|
seen.set(val, out);
|
|
7727
|
-
while (
|
|
7728
|
-
out[
|
|
7757
|
+
while (k2--)
|
|
7758
|
+
out[k2] = clone(val[k2], seen, options);
|
|
7729
7759
|
return out;
|
|
7730
7760
|
}
|
|
7731
7761
|
if (Object.prototype.toString.call(val) === "[object Object]") {
|
|
7732
7762
|
out = Object.create(Object.getPrototypeOf(val));
|
|
7733
7763
|
seen.set(val, out);
|
|
7734
7764
|
const props = getOwnProperties(val);
|
|
7735
|
-
for (const
|
|
7736
|
-
const descriptor = Object.getOwnPropertyDescriptor(val,
|
|
7765
|
+
for (const k22 of props) {
|
|
7766
|
+
const descriptor = Object.getOwnPropertyDescriptor(val, k22);
|
|
7737
7767
|
if (!descriptor)
|
|
7738
7768
|
continue;
|
|
7739
|
-
const cloned = clone(val[
|
|
7769
|
+
const cloned = clone(val[k22], seen, options);
|
|
7740
7770
|
if ("get" in descriptor) {
|
|
7741
|
-
Object.defineProperty(out,
|
|
7771
|
+
Object.defineProperty(out, k22, {
|
|
7742
7772
|
...descriptor,
|
|
7743
7773
|
get() {
|
|
7744
7774
|
return cloned;
|
|
7745
7775
|
}
|
|
7746
7776
|
});
|
|
7747
7777
|
} else {
|
|
7748
|
-
Object.defineProperty(out,
|
|
7778
|
+
Object.defineProperty(out, k22, {
|
|
7749
7779
|
...descriptor,
|
|
7750
7780
|
writable: options.forceWritable ? true : descriptor.writable,
|
|
7751
7781
|
value: cloned
|
|
@@ -7761,8 +7791,8 @@ function noop() {
|
|
|
7761
7791
|
function objectAttr(source, path2, defaultValue = void 0) {
|
|
7762
7792
|
const paths = path2.replace(/\[(\d+)\]/g, ".$1").split(".");
|
|
7763
7793
|
let result = source;
|
|
7764
|
-
for (const
|
|
7765
|
-
result = Object(result)[
|
|
7794
|
+
for (const p of paths) {
|
|
7795
|
+
result = Object(result)[p];
|
|
7766
7796
|
if (result === void 0)
|
|
7767
7797
|
return defaultValue;
|
|
7768
7798
|
}
|
|
@@ -7771,13 +7801,13 @@ function objectAttr(source, path2, defaultValue = void 0) {
|
|
|
7771
7801
|
function createDefer() {
|
|
7772
7802
|
let resolve3 = null;
|
|
7773
7803
|
let reject = null;
|
|
7774
|
-
const
|
|
7804
|
+
const p = new Promise((_resolve, _reject) => {
|
|
7775
7805
|
resolve3 = _resolve;
|
|
7776
7806
|
reject = _reject;
|
|
7777
7807
|
});
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
return
|
|
7808
|
+
p.resolve = resolve3;
|
|
7809
|
+
p.reject = reject;
|
|
7810
|
+
return p;
|
|
7781
7811
|
}
|
|
7782
7812
|
|
|
7783
7813
|
// ../../node_modules/@vitest/utils/dist/chunk-display.js
|
|
@@ -7827,21 +7857,21 @@ var formatRegExp = /%[sdjifoOcj%]/g;
|
|
|
7827
7857
|
function format(...args) {
|
|
7828
7858
|
if (typeof args[0] !== "string") {
|
|
7829
7859
|
const objects = [];
|
|
7830
|
-
for (let
|
|
7831
|
-
objects.push(inspect2(args[
|
|
7860
|
+
for (let i22 = 0; i22 < args.length; i22++)
|
|
7861
|
+
objects.push(inspect2(args[i22], { depth: 0, colors: false, compact: 3 }));
|
|
7832
7862
|
return objects.join(" ");
|
|
7833
7863
|
}
|
|
7834
7864
|
const len = args.length;
|
|
7835
|
-
let
|
|
7865
|
+
let i2 = 1;
|
|
7836
7866
|
const template = args[0];
|
|
7837
7867
|
let str = String(template).replace(formatRegExp, (x) => {
|
|
7838
7868
|
if (x === "%%")
|
|
7839
7869
|
return "%";
|
|
7840
|
-
if (
|
|
7870
|
+
if (i2 >= len)
|
|
7841
7871
|
return x;
|
|
7842
7872
|
switch (x) {
|
|
7843
7873
|
case "%s": {
|
|
7844
|
-
const value = args[
|
|
7874
|
+
const value = args[i2++];
|
|
7845
7875
|
if (typeof value === "bigint")
|
|
7846
7876
|
return `${value.toString()}n`;
|
|
7847
7877
|
if (typeof value === "number" && value === 0 && 1 / value < 0)
|
|
@@ -7851,35 +7881,35 @@ function format(...args) {
|
|
|
7851
7881
|
return String(value);
|
|
7852
7882
|
}
|
|
7853
7883
|
case "%d": {
|
|
7854
|
-
const value = args[
|
|
7884
|
+
const value = args[i2++];
|
|
7855
7885
|
if (typeof value === "bigint")
|
|
7856
7886
|
return `${value.toString()}n`;
|
|
7857
7887
|
return Number(value).toString();
|
|
7858
7888
|
}
|
|
7859
7889
|
case "%i": {
|
|
7860
|
-
const value = args[
|
|
7890
|
+
const value = args[i2++];
|
|
7861
7891
|
if (typeof value === "bigint")
|
|
7862
7892
|
return `${value.toString()}n`;
|
|
7863
7893
|
return Number.parseInt(String(value)).toString();
|
|
7864
7894
|
}
|
|
7865
7895
|
case "%f":
|
|
7866
|
-
return Number.parseFloat(String(args[
|
|
7896
|
+
return Number.parseFloat(String(args[i2++])).toString();
|
|
7867
7897
|
case "%o":
|
|
7868
|
-
return inspect2(args[
|
|
7898
|
+
return inspect2(args[i2++], { showHidden: true, showProxy: true });
|
|
7869
7899
|
case "%O":
|
|
7870
|
-
return inspect2(args[
|
|
7900
|
+
return inspect2(args[i2++]);
|
|
7871
7901
|
case "%c": {
|
|
7872
|
-
|
|
7902
|
+
i2++;
|
|
7873
7903
|
return "";
|
|
7874
7904
|
}
|
|
7875
7905
|
case "%j":
|
|
7876
7906
|
try {
|
|
7877
|
-
return JSON.stringify(args[
|
|
7907
|
+
return JSON.stringify(args[i2++]);
|
|
7878
7908
|
} catch (err) {
|
|
7879
|
-
const
|
|
7909
|
+
const m = err.message;
|
|
7880
7910
|
if (
|
|
7881
7911
|
// chromium
|
|
7882
|
-
|
|
7912
|
+
m.includes("circular structure") || m.includes("cyclic structures") || m.includes("cyclic object")
|
|
7883
7913
|
)
|
|
7884
7914
|
return "[Circular]";
|
|
7885
7915
|
throw err;
|
|
@@ -7888,7 +7918,7 @@ function format(...args) {
|
|
|
7888
7918
|
return x;
|
|
7889
7919
|
}
|
|
7890
7920
|
});
|
|
7891
|
-
for (let x = args[
|
|
7921
|
+
for (let x = args[i2]; i2 < len; x = args[++i2]) {
|
|
7892
7922
|
if (x === null || typeof x !== "object")
|
|
7893
7923
|
str += ` ${x}`;
|
|
7894
7924
|
else
|
|
@@ -8214,33 +8244,33 @@ function joinAlignedDiffsNoExpand(diffs, options) {
|
|
|
8214
8244
|
let jLength = iLength;
|
|
8215
8245
|
let hasExcessAtStartOrEnd = false;
|
|
8216
8246
|
let nExcessesBetweenChanges = 0;
|
|
8217
|
-
let
|
|
8218
|
-
while (
|
|
8219
|
-
const iStart =
|
|
8220
|
-
while (
|
|
8221
|
-
|
|
8222
|
-
if (iStart !==
|
|
8247
|
+
let i2 = 0;
|
|
8248
|
+
while (i2 !== iLength) {
|
|
8249
|
+
const iStart = i2;
|
|
8250
|
+
while (i2 !== iLength && diffs[i2][0] === DIFF_EQUAL)
|
|
8251
|
+
i2 += 1;
|
|
8252
|
+
if (iStart !== i2) {
|
|
8223
8253
|
if (iStart === 0) {
|
|
8224
|
-
if (
|
|
8225
|
-
jLength -=
|
|
8254
|
+
if (i2 > nContextLines) {
|
|
8255
|
+
jLength -= i2 - nContextLines;
|
|
8226
8256
|
hasExcessAtStartOrEnd = true;
|
|
8227
8257
|
}
|
|
8228
|
-
} else if (
|
|
8229
|
-
const n2 =
|
|
8258
|
+
} else if (i2 === iLength) {
|
|
8259
|
+
const n2 = i2 - iStart;
|
|
8230
8260
|
if (n2 > nContextLines) {
|
|
8231
8261
|
jLength -= n2 - nContextLines;
|
|
8232
8262
|
hasExcessAtStartOrEnd = true;
|
|
8233
8263
|
}
|
|
8234
8264
|
} else {
|
|
8235
|
-
const n2 =
|
|
8265
|
+
const n2 = i2 - iStart;
|
|
8236
8266
|
if (n2 > nContextLines2) {
|
|
8237
8267
|
jLength -= n2 - nContextLines2;
|
|
8238
8268
|
nExcessesBetweenChanges += 1;
|
|
8239
8269
|
}
|
|
8240
8270
|
}
|
|
8241
8271
|
}
|
|
8242
|
-
while (
|
|
8243
|
-
|
|
8272
|
+
while (i2 !== iLength && diffs[i2][0] !== DIFF_EQUAL)
|
|
8273
|
+
i2 += 1;
|
|
8244
8274
|
}
|
|
8245
8275
|
const hasPatch = nExcessesBetweenChanges !== 0 || hasExcessAtStartOrEnd;
|
|
8246
8276
|
if (nExcessesBetweenChanges !== 0)
|
|
@@ -8272,28 +8302,28 @@ function joinAlignedDiffsNoExpand(diffs, options) {
|
|
|
8272
8302
|
lines.push(printInsertLine(line, j === 0 || j === jLast, options));
|
|
8273
8303
|
bEnd += 1;
|
|
8274
8304
|
};
|
|
8275
|
-
|
|
8276
|
-
while (
|
|
8277
|
-
let iStart =
|
|
8278
|
-
while (
|
|
8279
|
-
|
|
8280
|
-
if (iStart !==
|
|
8305
|
+
i2 = 0;
|
|
8306
|
+
while (i2 !== iLength) {
|
|
8307
|
+
let iStart = i2;
|
|
8308
|
+
while (i2 !== iLength && diffs[i2][0] === DIFF_EQUAL)
|
|
8309
|
+
i2 += 1;
|
|
8310
|
+
if (iStart !== i2) {
|
|
8281
8311
|
if (iStart === 0) {
|
|
8282
|
-
if (
|
|
8283
|
-
iStart =
|
|
8312
|
+
if (i2 > nContextLines) {
|
|
8313
|
+
iStart = i2 - nContextLines;
|
|
8284
8314
|
aStart = iStart;
|
|
8285
8315
|
bStart = iStart;
|
|
8286
8316
|
aEnd = aStart;
|
|
8287
8317
|
bEnd = bStart;
|
|
8288
8318
|
}
|
|
8289
|
-
for (let iCommon = iStart; iCommon !==
|
|
8319
|
+
for (let iCommon = iStart; iCommon !== i2; iCommon += 1)
|
|
8290
8320
|
pushCommonLine(diffs[iCommon][1]);
|
|
8291
|
-
} else if (
|
|
8292
|
-
const iEnd =
|
|
8321
|
+
} else if (i2 === iLength) {
|
|
8322
|
+
const iEnd = i2 - iStart > nContextLines ? iStart + nContextLines : i2;
|
|
8293
8323
|
for (let iCommon = iStart; iCommon !== iEnd; iCommon += 1)
|
|
8294
8324
|
pushCommonLine(diffs[iCommon][1]);
|
|
8295
8325
|
} else {
|
|
8296
|
-
const nCommon =
|
|
8326
|
+
const nCommon = i2 - iStart;
|
|
8297
8327
|
if (nCommon > nContextLines2) {
|
|
8298
8328
|
const iEnd = iStart + nContextLines;
|
|
8299
8329
|
for (let iCommon = iStart; iCommon !== iEnd; iCommon += 1)
|
|
@@ -8312,21 +8342,21 @@ function joinAlignedDiffsNoExpand(diffs, options) {
|
|
|
8312
8342
|
bStart = bEnd + nOmit;
|
|
8313
8343
|
aEnd = aStart;
|
|
8314
8344
|
bEnd = bStart;
|
|
8315
|
-
for (let iCommon =
|
|
8345
|
+
for (let iCommon = i2 - nContextLines; iCommon !== i2; iCommon += 1)
|
|
8316
8346
|
pushCommonLine(diffs[iCommon][1]);
|
|
8317
8347
|
} else {
|
|
8318
|
-
for (let iCommon = iStart; iCommon !==
|
|
8348
|
+
for (let iCommon = iStart; iCommon !== i2; iCommon += 1)
|
|
8319
8349
|
pushCommonLine(diffs[iCommon][1]);
|
|
8320
8350
|
}
|
|
8321
8351
|
}
|
|
8322
8352
|
}
|
|
8323
|
-
while (
|
|
8324
|
-
pushDeleteLine(diffs[
|
|
8325
|
-
|
|
8353
|
+
while (i2 !== iLength && diffs[i2][0] === DIFF_DELETE) {
|
|
8354
|
+
pushDeleteLine(diffs[i2][1]);
|
|
8355
|
+
i2 += 1;
|
|
8326
8356
|
}
|
|
8327
|
-
while (
|
|
8328
|
-
pushInsertLine(diffs[
|
|
8329
|
-
|
|
8357
|
+
while (i2 !== iLength && diffs[i2][0] === DIFF_INSERT) {
|
|
8358
|
+
pushInsertLine(diffs[i2][1]);
|
|
8359
|
+
i2 += 1;
|
|
8330
8360
|
}
|
|
8331
8361
|
}
|
|
8332
8362
|
if (hasPatch)
|
|
@@ -8334,9 +8364,9 @@ function joinAlignedDiffsNoExpand(diffs, options) {
|
|
|
8334
8364
|
return lines.join("\n");
|
|
8335
8365
|
}
|
|
8336
8366
|
function joinAlignedDiffsExpand(diffs, options) {
|
|
8337
|
-
return diffs.map((diff2,
|
|
8367
|
+
return diffs.map((diff2, i2, diffs2) => {
|
|
8338
8368
|
const line = diff2[1];
|
|
8339
|
-
const isFirstOrLast =
|
|
8369
|
+
const isFirstOrLast = i2 === 0 || i2 === diffs2.length - 1;
|
|
8340
8370
|
switch (diff2[0]) {
|
|
8341
8371
|
case DIFF_DELETE:
|
|
8342
8372
|
return printDeleteLine(line, isFirstOrLast, options);
|
|
@@ -8350,17 +8380,17 @@ function joinAlignedDiffsExpand(diffs, options) {
|
|
|
8350
8380
|
var noColor = (string3) => string3;
|
|
8351
8381
|
var DIFF_CONTEXT_DEFAULT = 5;
|
|
8352
8382
|
function getDefaultOptions() {
|
|
8353
|
-
const
|
|
8383
|
+
const c2 = getColors();
|
|
8354
8384
|
return {
|
|
8355
8385
|
aAnnotation: "Expected",
|
|
8356
|
-
aColor:
|
|
8386
|
+
aColor: c2.green,
|
|
8357
8387
|
aIndicator: "-",
|
|
8358
8388
|
bAnnotation: "Received",
|
|
8359
|
-
bColor:
|
|
8389
|
+
bColor: c2.red,
|
|
8360
8390
|
bIndicator: "+",
|
|
8361
|
-
changeColor:
|
|
8391
|
+
changeColor: c2.inverse,
|
|
8362
8392
|
changeLineTrailingSpaceColor: noColor,
|
|
8363
|
-
commonColor:
|
|
8393
|
+
commonColor: c2.dim,
|
|
8364
8394
|
commonIndicator: " ",
|
|
8365
8395
|
commonLineTrailingSpaceColor: noColor,
|
|
8366
8396
|
compareKeys: void 0,
|
|
@@ -8369,7 +8399,7 @@ function getDefaultOptions() {
|
|
|
8369
8399
|
expand: true,
|
|
8370
8400
|
includeChangeCounts: false,
|
|
8371
8401
|
omitAnnotationLines: false,
|
|
8372
|
-
patchColor:
|
|
8402
|
+
patchColor: c2.yellow
|
|
8373
8403
|
};
|
|
8374
8404
|
}
|
|
8375
8405
|
function getCompareKeys(compareKeys) {
|
|
@@ -8645,8 +8675,8 @@ var import_diff_sequences = __toESM(require_build2(), 1);
|
|
|
8645
8675
|
init_loupe();
|
|
8646
8676
|
var IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
|
|
8647
8677
|
var IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
|
|
8648
|
-
function isImmutable(
|
|
8649
|
-
return
|
|
8678
|
+
function isImmutable(v) {
|
|
8679
|
+
return v && (v[IS_COLLECTION_SYMBOL] || v[IS_RECORD_SYMBOL]);
|
|
8650
8680
|
}
|
|
8651
8681
|
var OBJECT_PROTO = Object.getPrototypeOf({});
|
|
8652
8682
|
function getUnserializableMessage(err) {
|
|
@@ -8678,11 +8708,11 @@ function serializeError(val, seen = /* @__PURE__ */ new WeakMap()) {
|
|
|
8678
8708
|
if (Array.isArray(val)) {
|
|
8679
8709
|
const clone2 = new Array(val.length);
|
|
8680
8710
|
seen.set(val, clone2);
|
|
8681
|
-
val.forEach((e,
|
|
8711
|
+
val.forEach((e, i2) => {
|
|
8682
8712
|
try {
|
|
8683
|
-
clone2[
|
|
8713
|
+
clone2[i2] = serializeError(e, seen);
|
|
8684
8714
|
} catch (err) {
|
|
8685
|
-
clone2[
|
|
8715
|
+
clone2[i2] = getUnserializableMessage(err);
|
|
8686
8716
|
}
|
|
8687
8717
|
});
|
|
8688
8718
|
return clone2;
|
|
@@ -8747,7 +8777,7 @@ function isAsymmetricMatcher(data) {
|
|
|
8747
8777
|
function isReplaceable(obj1, obj2) {
|
|
8748
8778
|
const obj1Type = getType(obj1);
|
|
8749
8779
|
const obj2Type = getType(obj2);
|
|
8750
|
-
return obj1Type === obj2Type && obj1Type === "Object";
|
|
8780
|
+
return obj1Type === obj2Type && (obj1Type === "Object" || obj1Type === "Array");
|
|
8751
8781
|
}
|
|
8752
8782
|
function replaceAsymmetricMatcher(actual, expected, actualReplaced = /* @__PURE__ */ new WeakSet(), expectedReplaced = /* @__PURE__ */ new WeakSet()) {
|
|
8753
8783
|
if (!isReplaceable(actual, expected))
|
|
@@ -8782,7 +8812,7 @@ function replaceAsymmetricMatcher(actual, expected, actualReplaced = /* @__PURE_
|
|
|
8782
8812
|
};
|
|
8783
8813
|
}
|
|
8784
8814
|
|
|
8785
|
-
// ../../node_modules/@vitest/runner/dist/
|
|
8815
|
+
// ../../node_modules/@vitest/runner/dist/chunk-tasks.js
|
|
8786
8816
|
init_cjs_shims();
|
|
8787
8817
|
function createChainable(keys2, fn2) {
|
|
8788
8818
|
function create(context) {
|
|
@@ -8919,8 +8949,8 @@ function normalizeString(path2, allowAboveRoot) {
|
|
|
8919
8949
|
}
|
|
8920
8950
|
return res;
|
|
8921
8951
|
}
|
|
8922
|
-
var isAbsolute = function(
|
|
8923
|
-
return _IS_ABSOLUTE_RE.test(
|
|
8952
|
+
var isAbsolute = function(p) {
|
|
8953
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
8924
8954
|
};
|
|
8925
8955
|
|
|
8926
8956
|
// ../../node_modules/@vitest/runner/dist/index.js
|
|
@@ -8994,6 +9024,10 @@ function createTestContext(test3, runner2) {
|
|
|
8994
9024
|
test3.onFailed || (test3.onFailed = []);
|
|
8995
9025
|
test3.onFailed.push(fn2);
|
|
8996
9026
|
};
|
|
9027
|
+
context.onTestFinished = (fn2) => {
|
|
9028
|
+
test3.onFinished || (test3.onFinished = []);
|
|
9029
|
+
test3.onFinished.push(fn2);
|
|
9030
|
+
};
|
|
8997
9031
|
return ((_a2 = runner2.extendTaskContext) == null ? void 0 : _a2.call(runner2, context)) || context;
|
|
8998
9032
|
}
|
|
8999
9033
|
function makeTimeoutMsg(isHook, timeout) {
|
|
@@ -9001,14 +9035,16 @@ function makeTimeoutMsg(isHook, timeout) {
|
|
|
9001
9035
|
If this is a long-running ${isHook ? "hook" : "test"}, pass a timeout value as the last argument or configure it globally with "${isHook ? "hookTimeout" : "testTimeout"}".`;
|
|
9002
9036
|
}
|
|
9003
9037
|
function mergeContextFixtures(fixtures, context = {}) {
|
|
9004
|
-
const
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
value
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9038
|
+
const fixtureOptionKeys = ["auto"];
|
|
9039
|
+
const fixtureArray = Object.entries(fixtures).map(([prop, value]) => {
|
|
9040
|
+
const fixtureItem = { value };
|
|
9041
|
+
if (Array.isArray(value) && value.length >= 2 && isObject(value[1]) && Object.keys(value[1]).some((key) => fixtureOptionKeys.includes(key))) {
|
|
9042
|
+
Object.assign(fixtureItem, value[1]);
|
|
9043
|
+
fixtureItem.value = value[0];
|
|
9044
|
+
}
|
|
9045
|
+
fixtureItem.prop = prop;
|
|
9046
|
+
fixtureItem.isFn = typeof fixtureItem.value === "function";
|
|
9047
|
+
return fixtureItem;
|
|
9012
9048
|
});
|
|
9013
9049
|
if (Array.isArray(context.fixtures))
|
|
9014
9050
|
context.fixtures = context.fixtures.concat(fixtureArray);
|
|
@@ -9034,7 +9070,8 @@ function withFixtures(fn2, testContext) {
|
|
|
9034
9070
|
if (!(fixtures == null ? void 0 : fixtures.length))
|
|
9035
9071
|
return fn2(context);
|
|
9036
9072
|
const usedProps = getUsedProps(fn2);
|
|
9037
|
-
|
|
9073
|
+
const hasAutoFixture = fixtures.some(({ auto }) => auto);
|
|
9074
|
+
if (!usedProps.length && !hasAutoFixture)
|
|
9038
9075
|
return fn2(context);
|
|
9039
9076
|
if (!fixtureValueMaps.get(context))
|
|
9040
9077
|
fixtureValueMaps.set(context, /* @__PURE__ */ new Map());
|
|
@@ -9042,7 +9079,7 @@ function withFixtures(fn2, testContext) {
|
|
|
9042
9079
|
if (!cleanupFnArrayMap.has(context))
|
|
9043
9080
|
cleanupFnArrayMap.set(context, []);
|
|
9044
9081
|
const cleanupFnArray = cleanupFnArrayMap.get(context);
|
|
9045
|
-
const usedFixtures = fixtures.filter(({ prop }) => usedProps.includes(prop));
|
|
9082
|
+
const usedFixtures = fixtures.filter(({ prop, auto }) => auto || usedProps.includes(prop));
|
|
9046
9083
|
const pendingFixtures = resolveDeps(usedFixtures);
|
|
9047
9084
|
if (!pendingFixtures.length)
|
|
9048
9085
|
return fn2(context);
|
|
@@ -9091,7 +9128,7 @@ function resolveDeps(fixtures, depSet = /* @__PURE__ */ new Set(), pendingFixtur
|
|
|
9091
9128
|
return;
|
|
9092
9129
|
}
|
|
9093
9130
|
if (depSet.has(fixture))
|
|
9094
|
-
throw new Error(`Circular fixture dependency detected: ${fixture.prop} <- ${[...depSet].reverse().map((
|
|
9131
|
+
throw new Error(`Circular fixture dependency detected: ${fixture.prop} <- ${[...depSet].reverse().map((d) => d.prop).join(" <- ")}`);
|
|
9095
9132
|
depSet.add(fixture);
|
|
9096
9133
|
resolveDeps(fixture.deps, depSet, pendingFixtures);
|
|
9097
9134
|
pendingFixtures.push(fixture);
|
|
@@ -9122,16 +9159,16 @@ function splitByComma(s) {
|
|
|
9122
9159
|
const result = [];
|
|
9123
9160
|
const stack = [];
|
|
9124
9161
|
let start = 0;
|
|
9125
|
-
for (let
|
|
9126
|
-
if (s[
|
|
9127
|
-
stack.push(s[
|
|
9128
|
-
} else if (s[
|
|
9162
|
+
for (let i2 = 0; i2 < s.length; i2++) {
|
|
9163
|
+
if (s[i2] === "{" || s[i2] === "[") {
|
|
9164
|
+
stack.push(s[i2] === "{" ? "}" : "]");
|
|
9165
|
+
} else if (s[i2] === stack[stack.length - 1]) {
|
|
9129
9166
|
stack.pop();
|
|
9130
|
-
} else if (!stack.length && s[
|
|
9131
|
-
const token = s.substring(start,
|
|
9167
|
+
} else if (!stack.length && s[i2] === ",") {
|
|
9168
|
+
const token = s.substring(start, i2).trim();
|
|
9132
9169
|
if (token)
|
|
9133
9170
|
result.push(token);
|
|
9134
|
-
start =
|
|
9171
|
+
start = i2 + 1;
|
|
9135
9172
|
}
|
|
9136
9173
|
}
|
|
9137
9174
|
const lastToken = s.substring(start).trim();
|
|
@@ -9145,10 +9182,10 @@ function getCurrentTest() {
|
|
|
9145
9182
|
}
|
|
9146
9183
|
var suite = createSuite();
|
|
9147
9184
|
var test = createTest(
|
|
9148
|
-
function(name,
|
|
9185
|
+
function(name, optionsOrFn, optionsOrTest) {
|
|
9149
9186
|
if (getCurrentTest())
|
|
9150
9187
|
throw new Error('Calling the test function inside another test function is not allowed. Please put it inside "describe" or "suite" so it can be properly collected.');
|
|
9151
|
-
getCurrentSuite().test.fn.call(this, formatName(name),
|
|
9188
|
+
getCurrentSuite().test.fn.call(this, formatName(name), optionsOrFn, optionsOrTest);
|
|
9152
9189
|
}
|
|
9153
9190
|
);
|
|
9154
9191
|
var describe = suite;
|
|
@@ -9169,8 +9206,33 @@ function createSuiteHooks() {
|
|
|
9169
9206
|
afterEach: []
|
|
9170
9207
|
};
|
|
9171
9208
|
}
|
|
9209
|
+
function parseArguments(optionsOrFn, optionsOrTest) {
|
|
9210
|
+
let options = {};
|
|
9211
|
+
let fn2 = () => {
|
|
9212
|
+
};
|
|
9213
|
+
if (typeof optionsOrTest === "object") {
|
|
9214
|
+
if (typeof optionsOrFn === "object")
|
|
9215
|
+
throw new TypeError("Cannot use two objects as arguments. Please provide options and a function callback in that order.");
|
|
9216
|
+
options = optionsOrTest;
|
|
9217
|
+
} else if (typeof optionsOrTest === "number") {
|
|
9218
|
+
options = { timeout: optionsOrTest };
|
|
9219
|
+
} else if (typeof optionsOrFn === "object") {
|
|
9220
|
+
options = optionsOrFn;
|
|
9221
|
+
}
|
|
9222
|
+
if (typeof optionsOrFn === "function") {
|
|
9223
|
+
if (typeof optionsOrTest === "function")
|
|
9224
|
+
throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");
|
|
9225
|
+
fn2 = optionsOrFn;
|
|
9226
|
+
} else if (typeof optionsOrTest === "function") {
|
|
9227
|
+
fn2 = optionsOrTest;
|
|
9228
|
+
}
|
|
9229
|
+
return {
|
|
9230
|
+
options,
|
|
9231
|
+
handler: fn2
|
|
9232
|
+
};
|
|
9233
|
+
}
|
|
9172
9234
|
function createSuiteCollector(name, factory = () => {
|
|
9173
|
-
}, mode,
|
|
9235
|
+
}, mode, shuffle2, each, suiteOptions) {
|
|
9174
9236
|
const tasks = [];
|
|
9175
9237
|
const factoryQueue = [];
|
|
9176
9238
|
let suite2;
|
|
@@ -9209,16 +9271,18 @@ function createSuiteCollector(name, factory = () => {
|
|
|
9209
9271
|
tasks.push(task2);
|
|
9210
9272
|
return task2;
|
|
9211
9273
|
};
|
|
9212
|
-
const test22 = createTest(function(name2,
|
|
9213
|
-
|
|
9214
|
-
|
|
9274
|
+
const test22 = createTest(function(name2, optionsOrFn, optionsOrTest) {
|
|
9275
|
+
let { options, handler } = parseArguments(
|
|
9276
|
+
optionsOrFn,
|
|
9277
|
+
optionsOrTest
|
|
9278
|
+
);
|
|
9215
9279
|
if (typeof suiteOptions === "object")
|
|
9216
9280
|
options = Object.assign({}, suiteOptions, options);
|
|
9217
9281
|
options.concurrent = this.concurrent || !this.sequential && (options == null ? void 0 : options.concurrent);
|
|
9218
9282
|
options.sequential = this.sequential || !this.concurrent && (options == null ? void 0 : options.sequential);
|
|
9219
9283
|
const test3 = task(
|
|
9220
9284
|
formatName(name2),
|
|
9221
|
-
{ ...this, ...options, handler
|
|
9285
|
+
{ ...this, ...options, handler }
|
|
9222
9286
|
);
|
|
9223
9287
|
test3.type = "test";
|
|
9224
9288
|
});
|
|
@@ -9263,8 +9327,8 @@ function createSuiteCollector(name, factory = () => {
|
|
|
9263
9327
|
if (factory)
|
|
9264
9328
|
await runWithSuite(collector, () => factory(test22));
|
|
9265
9329
|
const allChildren = [];
|
|
9266
|
-
for (const
|
|
9267
|
-
allChildren.push(
|
|
9330
|
+
for (const i2 of [...factoryQueue, ...tasks])
|
|
9331
|
+
allChildren.push(i2.type === "collector" ? await i2.collect(file) : i2);
|
|
9268
9332
|
suite2.file = file;
|
|
9269
9333
|
suite2.tasks = allChildren;
|
|
9270
9334
|
allChildren.forEach((task2) => {
|
|
@@ -9278,28 +9342,34 @@ function createSuiteCollector(name, factory = () => {
|
|
|
9278
9342
|
return collector;
|
|
9279
9343
|
}
|
|
9280
9344
|
function createSuite() {
|
|
9281
|
-
function suiteFn(name,
|
|
9345
|
+
function suiteFn(name, factoryOrOptions, optionsOrFactory = {}) {
|
|
9282
9346
|
const mode = this.only ? "only" : this.skip ? "skip" : this.todo ? "todo" : "run";
|
|
9283
9347
|
const currentSuite = getCurrentSuite();
|
|
9284
|
-
|
|
9285
|
-
|
|
9348
|
+
let { options, handler: factory } = parseArguments(
|
|
9349
|
+
factoryOrOptions,
|
|
9350
|
+
optionsOrFactory
|
|
9351
|
+
);
|
|
9286
9352
|
if (currentSuite == null ? void 0 : currentSuite.options)
|
|
9287
9353
|
options = { ...currentSuite.options, ...options };
|
|
9288
9354
|
options.concurrent = this.concurrent || !this.sequential && (options == null ? void 0 : options.concurrent);
|
|
9289
9355
|
options.sequential = this.sequential || !this.concurrent && (options == null ? void 0 : options.sequential);
|
|
9290
|
-
return createSuiteCollector(formatName(name), factory, mode, this.
|
|
9356
|
+
return createSuiteCollector(formatName(name), factory, mode, this.shuffle, this.each, options);
|
|
9291
9357
|
}
|
|
9292
9358
|
suiteFn.each = function(cases, ...args) {
|
|
9293
9359
|
const suite2 = this.withContext();
|
|
9294
9360
|
this.setContext("each", true);
|
|
9295
9361
|
if (Array.isArray(cases) && args.length)
|
|
9296
9362
|
cases = formatTemplateString(cases, args);
|
|
9297
|
-
return (name,
|
|
9363
|
+
return (name, optionsOrFn, fnOrOptions) => {
|
|
9298
9364
|
const _name = formatName(name);
|
|
9299
9365
|
const arrayOnlyCases = cases.every(Array.isArray);
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9366
|
+
const { options, handler } = parseArguments(
|
|
9367
|
+
optionsOrFn,
|
|
9368
|
+
fnOrOptions
|
|
9369
|
+
);
|
|
9370
|
+
cases.forEach((i2, idx) => {
|
|
9371
|
+
const items = Array.isArray(i2) ? i2 : [i2];
|
|
9372
|
+
arrayOnlyCases ? suite2(formatTitle(_name, items, idx), options, () => handler(...items)) : suite2(formatTitle(_name, items, idx), options, () => handler(i2));
|
|
9303
9373
|
});
|
|
9304
9374
|
this.setContext("each", void 0);
|
|
9305
9375
|
};
|
|
@@ -9318,12 +9388,16 @@ function createTaskCollector(fn2, context) {
|
|
|
9318
9388
|
this.setContext("each", true);
|
|
9319
9389
|
if (Array.isArray(cases) && args.length)
|
|
9320
9390
|
cases = formatTemplateString(cases, args);
|
|
9321
|
-
return (name,
|
|
9391
|
+
return (name, optionsOrFn, fnOrOptions) => {
|
|
9322
9392
|
const _name = formatName(name);
|
|
9323
9393
|
const arrayOnlyCases = cases.every(Array.isArray);
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9394
|
+
const { options, handler } = parseArguments(
|
|
9395
|
+
optionsOrFn,
|
|
9396
|
+
fnOrOptions
|
|
9397
|
+
);
|
|
9398
|
+
cases.forEach((i2, idx) => {
|
|
9399
|
+
const items = Array.isArray(i2) ? i2 : [i2];
|
|
9400
|
+
arrayOnlyCases ? test22(formatTitle(_name, items, idx), options, () => handler(...items)) : test22(formatTitle(_name, items, idx), options, () => handler(i2));
|
|
9327
9401
|
});
|
|
9328
9402
|
this.setContext("each", void 0);
|
|
9329
9403
|
};
|
|
@@ -9336,8 +9410,8 @@ function createTaskCollector(fn2, context) {
|
|
|
9336
9410
|
};
|
|
9337
9411
|
taskFn.extend = function(fixtures) {
|
|
9338
9412
|
const _context = mergeContextFixtures(fixtures, context);
|
|
9339
|
-
return createTest(function fn22(name,
|
|
9340
|
-
getCurrentSuite().test.fn.call(this, formatName(name),
|
|
9413
|
+
return createTest(function fn22(name, optionsOrFn, optionsOrTest) {
|
|
9414
|
+
getCurrentSuite().test.fn.call(this, formatName(name), optionsOrFn, optionsOrTest);
|
|
9341
9415
|
}, _context);
|
|
9342
9416
|
};
|
|
9343
9417
|
const _test2 = createChainable(
|
|
@@ -9373,12 +9447,12 @@ function formatTitle(template, items, idx) {
|
|
|
9373
9447
|
return formatted;
|
|
9374
9448
|
}
|
|
9375
9449
|
function formatTemplateString(cases, args) {
|
|
9376
|
-
const header = cases.join("").trim().replace(/ /g, "").split("\n").map((
|
|
9450
|
+
const header = cases.join("").trim().replace(/ /g, "").split("\n").map((i2) => i2.split("|"))[0];
|
|
9377
9451
|
const res = [];
|
|
9378
|
-
for (let
|
|
9452
|
+
for (let i2 = 0; i2 < Math.floor(args.length / header.length); i2++) {
|
|
9379
9453
|
const oneCase = {};
|
|
9380
9454
|
for (let j = 0; j < header.length; j++)
|
|
9381
|
-
oneCase[header[j]] = args[
|
|
9455
|
+
oneCase[header[j]] = args[i2 * header.length + j];
|
|
9382
9456
|
res.push(oneCase);
|
|
9383
9457
|
}
|
|
9384
9458
|
return res;
|
|
@@ -9404,19 +9478,26 @@ var onTestFailed = createTestHook("onTestFailed", (test3, handler) => {
|
|
|
9404
9478
|
test3.onFailed || (test3.onFailed = []);
|
|
9405
9479
|
test3.onFailed.push(handler);
|
|
9406
9480
|
});
|
|
9481
|
+
var onTestFinished = createTestHook("onTestFinished", (test3, handler) => {
|
|
9482
|
+
test3.onFinished || (test3.onFinished = []);
|
|
9483
|
+
test3.onFinished.push(handler);
|
|
9484
|
+
});
|
|
9407
9485
|
function createTestHook(name, handler) {
|
|
9408
9486
|
return (fn2) => {
|
|
9409
9487
|
const current = getCurrentTest();
|
|
9410
9488
|
if (!current)
|
|
9411
9489
|
throw new Error(`Hook ${name}() can only be called inside a test`);
|
|
9412
|
-
handler(current, fn2);
|
|
9490
|
+
return handler(current, fn2);
|
|
9413
9491
|
};
|
|
9414
9492
|
}
|
|
9415
9493
|
|
|
9416
|
-
// ../../node_modules/vitest/dist/vendor/benchmark.
|
|
9494
|
+
// ../../node_modules/vitest/dist/vendor/benchmark.eeqk2rd8.js
|
|
9417
9495
|
init_cjs_shims();
|
|
9418
9496
|
|
|
9419
|
-
// ../../node_modules
|
|
9497
|
+
// ../../node_modules/@vitest/runner/dist/utils.js
|
|
9498
|
+
init_cjs_shims();
|
|
9499
|
+
|
|
9500
|
+
// ../../node_modules/vitest/dist/vendor/index.ir9i0ywP.js
|
|
9420
9501
|
init_cjs_shims();
|
|
9421
9502
|
|
|
9422
9503
|
// ../../node_modules/vitest/dist/vendor/global.CkGT_TMy.js
|
|
@@ -9434,7 +9515,7 @@ function getCurrentEnvironment() {
|
|
|
9434
9515
|
return state == null ? void 0 : state.environment.name;
|
|
9435
9516
|
}
|
|
9436
9517
|
|
|
9437
|
-
// ../../node_modules/vitest/dist/vendor/index.
|
|
9518
|
+
// ../../node_modules/vitest/dist/vendor/index.ir9i0ywP.js
|
|
9438
9519
|
var _a;
|
|
9439
9520
|
var isNode = typeof process < "u" && typeof process.stdout < "u" && !((_a = process.versions) == null ? void 0 : _a.deno) && !globalThis.window;
|
|
9440
9521
|
var isWindows = isNode && process.platform === "win32";
|
|
@@ -9445,7 +9526,7 @@ function isRunningInBenchmark() {
|
|
|
9445
9526
|
return getRunMode() === "benchmark";
|
|
9446
9527
|
}
|
|
9447
9528
|
|
|
9448
|
-
// ../../node_modules/vitest/dist/vendor/benchmark.
|
|
9529
|
+
// ../../node_modules/vitest/dist/vendor/benchmark.eeqk2rd8.js
|
|
9449
9530
|
var benchFns = /* @__PURE__ */ new WeakMap();
|
|
9450
9531
|
var benchOptsMap = /* @__PURE__ */ new WeakMap();
|
|
9451
9532
|
var bench = createBenchmark(
|
|
@@ -9498,7 +9579,7 @@ function isFirstRun() {
|
|
|
9498
9579
|
return firstRun;
|
|
9499
9580
|
}
|
|
9500
9581
|
|
|
9501
|
-
// ../../node_modules/vitest/dist/vendor/vi.
|
|
9582
|
+
// ../../node_modules/vitest/dist/vendor/vi.C5mroSoP.js
|
|
9502
9583
|
init_cjs_shims();
|
|
9503
9584
|
|
|
9504
9585
|
// ../../node_modules/chai/index.mjs
|
|
@@ -9545,67 +9626,70 @@ init_cjs_shims();
|
|
|
9545
9626
|
|
|
9546
9627
|
// ../../node_modules/tinyspy/dist/index.js
|
|
9547
9628
|
init_cjs_shims();
|
|
9548
|
-
function
|
|
9629
|
+
function R(e, t) {
|
|
9549
9630
|
if (!e)
|
|
9550
9631
|
throw new Error(t);
|
|
9551
9632
|
}
|
|
9552
|
-
function
|
|
9633
|
+
function u(e, t) {
|
|
9553
9634
|
return typeof t === e;
|
|
9554
9635
|
}
|
|
9555
9636
|
function b(e) {
|
|
9556
9637
|
return e instanceof Promise;
|
|
9557
9638
|
}
|
|
9558
|
-
function
|
|
9639
|
+
function f(e, t, n2) {
|
|
9559
9640
|
Object.defineProperty(e, t, n2);
|
|
9560
9641
|
}
|
|
9561
|
-
function
|
|
9642
|
+
function i(e, t, n2) {
|
|
9562
9643
|
Object.defineProperty(e, t, { value: n2 });
|
|
9563
9644
|
}
|
|
9564
|
-
var
|
|
9565
|
-
var
|
|
9566
|
-
var
|
|
9645
|
+
var c = Symbol.for("tinyspy:spy");
|
|
9646
|
+
var g = /* @__PURE__ */ new Set();
|
|
9647
|
+
var C = (e) => {
|
|
9567
9648
|
e.called = false, e.callCount = 0, e.calls = [], e.results = [], e.next = [];
|
|
9568
9649
|
};
|
|
9569
|
-
var
|
|
9570
|
-
var
|
|
9571
|
-
function
|
|
9572
|
-
|
|
9573
|
-
let t = function(...
|
|
9574
|
-
let r =
|
|
9575
|
-
r.called = true, r.callCount++, r.calls.push(
|
|
9576
|
-
let
|
|
9577
|
-
if (
|
|
9578
|
-
r.results.push(
|
|
9579
|
-
let [
|
|
9580
|
-
if (
|
|
9581
|
-
return
|
|
9582
|
-
throw
|
|
9583
|
-
}
|
|
9584
|
-
let
|
|
9650
|
+
var M = (e) => (f(e, c, { value: { reset: () => C(e[c]) } }), e[c]);
|
|
9651
|
+
var A = (e) => e[c] || M(e);
|
|
9652
|
+
function I(e) {
|
|
9653
|
+
R(u("function", e) || u("undefined", e), "cannot spy on a non-function value");
|
|
9654
|
+
let t = function(...s) {
|
|
9655
|
+
let r = A(t);
|
|
9656
|
+
r.called = true, r.callCount++, r.calls.push(s);
|
|
9657
|
+
let m = r.next.shift();
|
|
9658
|
+
if (m) {
|
|
9659
|
+
r.results.push(m);
|
|
9660
|
+
let [l, o] = m;
|
|
9661
|
+
if (l === "ok")
|
|
9662
|
+
return o;
|
|
9663
|
+
throw o;
|
|
9664
|
+
}
|
|
9665
|
+
let p, d = "ok";
|
|
9585
9666
|
if (r.impl)
|
|
9586
9667
|
try {
|
|
9587
|
-
new.target ?
|
|
9588
|
-
} catch (
|
|
9589
|
-
throw
|
|
9590
|
-
}
|
|
9591
|
-
let
|
|
9592
|
-
if (b(
|
|
9593
|
-
let
|
|
9594
|
-
throw
|
|
9668
|
+
new.target ? p = Reflect.construct(r.impl, s, new.target) : p = r.impl.apply(this, s), d = "ok";
|
|
9669
|
+
} catch (l) {
|
|
9670
|
+
throw p = l, d = "error", r.results.push([d, l]), l;
|
|
9671
|
+
}
|
|
9672
|
+
let a = [d, p];
|
|
9673
|
+
if (b(p)) {
|
|
9674
|
+
let l = p.then((o) => a[1] = o).catch((o) => {
|
|
9675
|
+
throw a[0] = "error", a[1] = o, o;
|
|
9595
9676
|
});
|
|
9596
|
-
Object.assign(
|
|
9677
|
+
Object.assign(l, p), p = l;
|
|
9597
9678
|
}
|
|
9598
|
-
return r.results.push(
|
|
9679
|
+
return r.results.push(a), p;
|
|
9599
9680
|
};
|
|
9600
|
-
|
|
9601
|
-
let n2 =
|
|
9681
|
+
i(t, "_isMockFunction", true), i(t, "length", e ? e.length : 0), i(t, "name", e && e.name || "spy");
|
|
9682
|
+
let n2 = A(t);
|
|
9602
9683
|
return n2.reset(), n2.impl = e, t;
|
|
9603
9684
|
}
|
|
9604
|
-
var
|
|
9685
|
+
var k = (e, t) => Object.getOwnPropertyDescriptor(e, t);
|
|
9686
|
+
var P = (e, t) => {
|
|
9687
|
+
t != null && typeof t == "function" && t.prototype != null && Object.setPrototypeOf(e.prototype, t.prototype);
|
|
9688
|
+
};
|
|
9605
9689
|
function E(e, t, n2) {
|
|
9606
|
-
|
|
9607
|
-
let
|
|
9608
|
-
if (!
|
|
9690
|
+
R(!u("undefined", e), "spyOn could not find an object to spy upon"), R(u("object", e) || u("function", e), "cannot spyOn on a primitive value");
|
|
9691
|
+
let [s, r] = (() => {
|
|
9692
|
+
if (!u("object", t))
|
|
9609
9693
|
return [t, "value"];
|
|
9610
9694
|
if ("getter" in t && "setter" in t)
|
|
9611
9695
|
throw new Error("cannot spy on both getter and setter");
|
|
@@ -9614,20 +9698,22 @@ function E(e, t, n2) {
|
|
|
9614
9698
|
if ("setter" in t)
|
|
9615
9699
|
return [t.setter, "set"];
|
|
9616
9700
|
throw new Error("specify getter or setter to spy on");
|
|
9617
|
-
}
|
|
9618
|
-
|
|
9701
|
+
})(), m = k(e, s), p = Object.getPrototypeOf(e), d = p && k(p, s), a = m || d;
|
|
9702
|
+
R(a || s in e, `${String(s)} does not exist`);
|
|
9619
9703
|
let l = false;
|
|
9620
|
-
|
|
9621
|
-
let
|
|
9622
|
-
|
|
9623
|
-
let
|
|
9624
|
-
|
|
9704
|
+
r === "value" && a && !a.value && a.get && (r = "get", l = true, n2 = a.get());
|
|
9705
|
+
let o;
|
|
9706
|
+
a ? o = a[r] : r !== "value" ? o = () => e[s] : o = e[s], n2 || (n2 = o);
|
|
9707
|
+
let y = I(n2);
|
|
9708
|
+
r === "value" && P(y, o);
|
|
9709
|
+
let O = (h) => {
|
|
9710
|
+
let { value: G, ...w } = a || {
|
|
9625
9711
|
configurable: true,
|
|
9626
9712
|
writable: true
|
|
9627
9713
|
};
|
|
9628
|
-
|
|
9629
|
-
}, K = () =>
|
|
9630
|
-
return
|
|
9714
|
+
r !== "value" && delete w.writable, w[r] = h, f(e, s, w);
|
|
9715
|
+
}, K = () => a ? f(e, s, a) : O(o), T = y[c];
|
|
9716
|
+
return i(T, "restore", K), i(T, "getOriginal", () => l ? o() : o), i(T, "willCall", (h) => (T.impl = h, y)), O(l ? () => (P(y, n2), y) : y), g.add(y), y;
|
|
9631
9717
|
}
|
|
9632
9718
|
|
|
9633
9719
|
// ../../node_modules/@vitest/spy/dist/index.js
|
|
@@ -9650,7 +9736,7 @@ function enhanceSpy(spy) {
|
|
|
9650
9736
|
let implementation;
|
|
9651
9737
|
let instances = [];
|
|
9652
9738
|
let invocations = [];
|
|
9653
|
-
const state =
|
|
9739
|
+
const state = A(spy);
|
|
9654
9740
|
const mockContext = {
|
|
9655
9741
|
get calls() {
|
|
9656
9742
|
return state.calls;
|
|
@@ -9793,12 +9879,12 @@ function setState(state, expect2) {
|
|
|
9793
9879
|
map2.set(expect2, current);
|
|
9794
9880
|
}
|
|
9795
9881
|
function getMatcherUtils() {
|
|
9796
|
-
const
|
|
9797
|
-
const EXPECTED_COLOR =
|
|
9798
|
-
const RECEIVED_COLOR =
|
|
9799
|
-
const INVERTED_COLOR =
|
|
9800
|
-
const BOLD_WEIGHT =
|
|
9801
|
-
const DIM_COLOR =
|
|
9882
|
+
const c2 = () => getColors();
|
|
9883
|
+
const EXPECTED_COLOR = c2().green;
|
|
9884
|
+
const RECEIVED_COLOR = c2().red;
|
|
9885
|
+
const INVERTED_COLOR = c2().inverse;
|
|
9886
|
+
const BOLD_WEIGHT = c2().bold;
|
|
9887
|
+
const DIM_COLOR = c2().dim;
|
|
9802
9888
|
function matcherHint(matcherName, received = "received", expected = "expected", options = {}) {
|
|
9803
9889
|
const {
|
|
9804
9890
|
comment = "",
|
|
@@ -9899,8 +9985,8 @@ function eq(a, b2, aStack, bStack, customTesters, hasKey2) {
|
|
|
9899
9985
|
if (asymmetricResult !== void 0)
|
|
9900
9986
|
return asymmetricResult;
|
|
9901
9987
|
const testerContext = { equals };
|
|
9902
|
-
for (let
|
|
9903
|
-
const customTesterResult = customTesters[
|
|
9988
|
+
for (let i2 = 0; i2 < customTesters.length; i2++) {
|
|
9989
|
+
const customTesterResult = customTesters[i2].call(testerContext, a, b2, customTesters);
|
|
9904
9990
|
if (customTesterResult !== void 0)
|
|
9905
9991
|
return customTesterResult;
|
|
9906
9992
|
}
|
|
@@ -10134,8 +10220,8 @@ function arrayBufferEquality(a, b2) {
|
|
|
10134
10220
|
}
|
|
10135
10221
|
if (dataViewA.byteLength !== dataViewB.byteLength)
|
|
10136
10222
|
return false;
|
|
10137
|
-
for (let
|
|
10138
|
-
if (dataViewA.getUint8(
|
|
10223
|
+
for (let i2 = 0; i2 < dataViewA.byteLength; i2++) {
|
|
10224
|
+
if (dataViewA.getUint8(i2) !== dataViewB.getUint8(i2))
|
|
10139
10225
|
return false;
|
|
10140
10226
|
}
|
|
10141
10227
|
return true;
|
|
@@ -10472,7 +10558,7 @@ function wrapSoft(utils, fn2) {
|
|
|
10472
10558
|
}
|
|
10473
10559
|
var JestChaiExpect = (chai3, utils) => {
|
|
10474
10560
|
const { AssertionError: AssertionError2 } = chai3;
|
|
10475
|
-
const
|
|
10561
|
+
const c2 = () => getColors();
|
|
10476
10562
|
const customTesters = getCustomEqualityTesters();
|
|
10477
10563
|
function def(name, fn2) {
|
|
10478
10564
|
const addMethod = (n2) => {
|
|
@@ -10485,8 +10571,8 @@ var JestChaiExpect = (chai3, utils) => {
|
|
|
10485
10571
|
else
|
|
10486
10572
|
addMethod(name);
|
|
10487
10573
|
}
|
|
10488
|
-
["throw", "throws", "Throw"].forEach((
|
|
10489
|
-
utils.overwriteMethod(chai3.Assertion.prototype,
|
|
10574
|
+
["throw", "throws", "Throw"].forEach((m) => {
|
|
10575
|
+
utils.overwriteMethod(chai3.Assertion.prototype, m, (_super) => {
|
|
10490
10576
|
return function(...args) {
|
|
10491
10577
|
const promise = utils.flag(this, "promise");
|
|
10492
10578
|
const object2 = utils.flag(this, "object");
|
|
@@ -10803,25 +10889,25 @@ var JestChaiExpect = (chai3, utils) => {
|
|
|
10803
10889
|
assertIsMock(assertion);
|
|
10804
10890
|
return assertion._obj;
|
|
10805
10891
|
};
|
|
10806
|
-
const ordinalOf = (
|
|
10807
|
-
const j =
|
|
10808
|
-
const
|
|
10809
|
-
if (j === 1 &&
|
|
10810
|
-
return `${
|
|
10811
|
-
if (j === 2 &&
|
|
10812
|
-
return `${
|
|
10813
|
-
if (j === 3 &&
|
|
10814
|
-
return `${
|
|
10815
|
-
return `${
|
|
10892
|
+
const ordinalOf = (i2) => {
|
|
10893
|
+
const j = i2 % 10;
|
|
10894
|
+
const k2 = i2 % 100;
|
|
10895
|
+
if (j === 1 && k2 !== 11)
|
|
10896
|
+
return `${i2}st`;
|
|
10897
|
+
if (j === 2 && k2 !== 12)
|
|
10898
|
+
return `${i2}nd`;
|
|
10899
|
+
if (j === 3 && k2 !== 13)
|
|
10900
|
+
return `${i2}rd`;
|
|
10901
|
+
return `${i2}th`;
|
|
10816
10902
|
};
|
|
10817
10903
|
const formatCalls = (spy, msg, actualCall) => {
|
|
10818
10904
|
if (spy.mock.calls) {
|
|
10819
|
-
msg +=
|
|
10905
|
+
msg += c2().gray(`
|
|
10820
10906
|
|
|
10821
10907
|
Received:
|
|
10822
10908
|
|
|
10823
|
-
${spy.mock.calls.map((callArg,
|
|
10824
|
-
let methodCall =
|
|
10909
|
+
${spy.mock.calls.map((callArg, i2) => {
|
|
10910
|
+
let methodCall = c2().bold(` ${ordinalOf(i2 + 1)} ${spy.getMockName()} call:
|
|
10825
10911
|
|
|
10826
10912
|
`);
|
|
10827
10913
|
if (actualCall)
|
|
@@ -10832,19 +10918,19 @@ ${spy.mock.calls.map((callArg, i) => {
|
|
|
10832
10918
|
return methodCall;
|
|
10833
10919
|
}).join("\n")}`);
|
|
10834
10920
|
}
|
|
10835
|
-
msg +=
|
|
10921
|
+
msg += c2().gray(`
|
|
10836
10922
|
|
|
10837
|
-
Number of calls: ${
|
|
10923
|
+
Number of calls: ${c2().bold(spy.mock.calls.length)}
|
|
10838
10924
|
`);
|
|
10839
10925
|
return msg;
|
|
10840
10926
|
};
|
|
10841
10927
|
const formatReturns = (spy, msg, actualReturn) => {
|
|
10842
|
-
msg +=
|
|
10928
|
+
msg += c2().gray(`
|
|
10843
10929
|
|
|
10844
10930
|
Received:
|
|
10845
10931
|
|
|
10846
|
-
${spy.mock.results.map((callReturn,
|
|
10847
|
-
let methodCall =
|
|
10932
|
+
${spy.mock.results.map((callReturn, i2) => {
|
|
10933
|
+
let methodCall = c2().bold(` ${ordinalOf(i2 + 1)} ${spy.getMockName()} call return:
|
|
10848
10934
|
|
|
10849
10935
|
`);
|
|
10850
10936
|
if (actualReturn)
|
|
@@ -10854,9 +10940,9 @@ ${spy.mock.results.map((callReturn, i) => {
|
|
|
10854
10940
|
methodCall += "\n";
|
|
10855
10941
|
return methodCall;
|
|
10856
10942
|
}).join("\n")}`);
|
|
10857
|
-
msg +=
|
|
10943
|
+
msg += c2().gray(`
|
|
10858
10944
|
|
|
10859
|
-
Number of calls: ${
|
|
10945
|
+
Number of calls: ${c2().bold(spy.mock.calls.length)}
|
|
10860
10946
|
`);
|
|
10861
10947
|
return msg;
|
|
10862
10948
|
};
|
|
@@ -10990,8 +11076,7 @@ Number of calls: ${c().bold(spy.mock.calls.length)}
|
|
|
10990
11076
|
`expected error to be instance of ${name}`,
|
|
10991
11077
|
`expected error not to be instance of ${name}`,
|
|
10992
11078
|
expected,
|
|
10993
|
-
thrown
|
|
10994
|
-
false
|
|
11079
|
+
thrown
|
|
10995
11080
|
);
|
|
10996
11081
|
}
|
|
10997
11082
|
if (expected instanceof Error) {
|
|
@@ -11009,9 +11094,8 @@ Number of calls: ${c().bold(spy.mock.calls.length)}
|
|
|
11009
11094
|
thrown && matcher.asymmetricMatch(thrown),
|
|
11010
11095
|
"expected error to match asymmetric matcher",
|
|
11011
11096
|
"expected error not to match asymmetric matcher",
|
|
11012
|
-
matcher
|
|
11013
|
-
thrown
|
|
11014
|
-
false
|
|
11097
|
+
matcher,
|
|
11098
|
+
thrown
|
|
11015
11099
|
);
|
|
11016
11100
|
}
|
|
11017
11101
|
throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof expected}"`);
|
|
@@ -11198,7 +11282,7 @@ var JestExtendError = class extends Error {
|
|
|
11198
11282
|
}
|
|
11199
11283
|
};
|
|
11200
11284
|
function JestExtendPlugin(expect2, matchers) {
|
|
11201
|
-
return (
|
|
11285
|
+
return (c2, utils) => {
|
|
11202
11286
|
Object.entries(matchers).forEach(([expectAssertionName, expectAssertion]) => {
|
|
11203
11287
|
function expectWrapper(...args) {
|
|
11204
11288
|
const { state, isNot, obj } = getMatcherState(this, expect2);
|
|
@@ -11215,7 +11299,7 @@ function JestExtendPlugin(expect2, matchers) {
|
|
|
11215
11299
|
}
|
|
11216
11300
|
const softWrapper = wrapSoft(utils, expectWrapper);
|
|
11217
11301
|
utils.addMethod(globalThis[JEST_MATCHERS_OBJECT].matchers, expectAssertionName, softWrapper);
|
|
11218
|
-
utils.addMethod(
|
|
11302
|
+
utils.addMethod(c2.Assertion.prototype, expectAssertionName, softWrapper);
|
|
11219
11303
|
class CustomMatcher extends AsymmetricMatcher3 {
|
|
11220
11304
|
constructor(inverse = false, ...sample) {
|
|
11221
11305
|
super(sample, inverse);
|
|
@@ -11274,12 +11358,12 @@ function getDefaultExportFromCjs2(x) {
|
|
|
11274
11358
|
}
|
|
11275
11359
|
var naturalCompare$2 = { exports: {} };
|
|
11276
11360
|
var naturalCompare = function(a, b2) {
|
|
11277
|
-
var
|
|
11361
|
+
var i2, codeA, codeB = 1, posA = 0, posB = 0, alphabet = String.alphabet;
|
|
11278
11362
|
function getCode(str, pos, code) {
|
|
11279
11363
|
if (code) {
|
|
11280
|
-
for (
|
|
11281
|
-
++
|
|
11282
|
-
return +str.slice(pos - 1,
|
|
11364
|
+
for (i2 = pos; code = getCode(str, i2), code < 76 && code > 65; )
|
|
11365
|
+
++i2;
|
|
11366
|
+
return +str.slice(pos - 1, i2);
|
|
11283
11367
|
}
|
|
11284
11368
|
code = alphabet && alphabet.indexOf(str.charAt(pos));
|
|
11285
11369
|
return code > -1 ? code + 76 : (code = str.charCodeAt(pos) || 0, code < 45 || code > 127) ? code : code < 46 ? 65 : code < 48 ? code - 1 : code < 58 ? code + 18 : code < 65 ? code - 11 : code < 91 ? code + 11 : code < 97 ? code - 37 : code < 123 ? code + 5 : code - 63;
|
|
@@ -11290,8 +11374,8 @@ var naturalCompare = function(a, b2) {
|
|
|
11290
11374
|
codeB = getCode(b2, posB++);
|
|
11291
11375
|
if (codeA < 76 && codeB < 76 && codeA > 66 && codeB > 66) {
|
|
11292
11376
|
codeA = getCode(a, posA, posA);
|
|
11293
|
-
codeB = getCode(b2, posB, posA =
|
|
11294
|
-
posB =
|
|
11377
|
+
codeB = getCode(b2, posB, posA = i2);
|
|
11378
|
+
posB = i2;
|
|
11295
11379
|
}
|
|
11296
11380
|
if (codeA != codeB)
|
|
11297
11381
|
return codeA < codeB ? -1 : 1;
|
|
@@ -11305,8 +11389,8 @@ try {
|
|
|
11305
11389
|
}
|
|
11306
11390
|
var naturalCompareExports = naturalCompare$2.exports;
|
|
11307
11391
|
var naturalCompare$1 = /* @__PURE__ */ getDefaultExportFromCjs2(naturalCompareExports);
|
|
11308
|
-
function notNullish2(
|
|
11309
|
-
return
|
|
11392
|
+
function notNullish2(v) {
|
|
11393
|
+
return v != null;
|
|
11310
11394
|
}
|
|
11311
11395
|
function isPrimitive2(value) {
|
|
11312
11396
|
return value === null || typeof value !== "function" && typeof value !== "object";
|
|
@@ -11370,8 +11454,8 @@ function positionToOffset(source, lineNumber, columnNumber) {
|
|
|
11370
11454
|
let start = 0;
|
|
11371
11455
|
if (lineNumber > lines.length)
|
|
11372
11456
|
return source.length;
|
|
11373
|
-
for (let
|
|
11374
|
-
start += lines[
|
|
11457
|
+
for (let i2 = 0; i2 < lineNumber - 1; i2++)
|
|
11458
|
+
start += lines[i2].length + nl;
|
|
11375
11459
|
return start + columnNumber;
|
|
11376
11460
|
}
|
|
11377
11461
|
function offsetToLineNumber(source, offset) {
|
|
@@ -11611,10 +11695,10 @@ var comma2 = ",".charCodeAt(0);
|
|
|
11611
11695
|
var chars2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
11612
11696
|
var intToChar2 = new Uint8Array(64);
|
|
11613
11697
|
var charToInt2 = new Uint8Array(128);
|
|
11614
|
-
for (let
|
|
11615
|
-
const
|
|
11616
|
-
intToChar2[
|
|
11617
|
-
charToInt2[
|
|
11698
|
+
for (let i2 = 0; i2 < chars2.length; i2++) {
|
|
11699
|
+
const c2 = chars2.charCodeAt(i2);
|
|
11700
|
+
intToChar2[i2] = c2;
|
|
11701
|
+
charToInt2[c2] = i2;
|
|
11618
11702
|
}
|
|
11619
11703
|
function decode(mappings) {
|
|
11620
11704
|
const state = new Int32Array(5);
|
|
@@ -11626,19 +11710,19 @@ function decode(mappings) {
|
|
|
11626
11710
|
let sorted = true;
|
|
11627
11711
|
let lastCol = 0;
|
|
11628
11712
|
state[0] = 0;
|
|
11629
|
-
for (let
|
|
11713
|
+
for (let i2 = index; i2 < semi; i2++) {
|
|
11630
11714
|
let seg;
|
|
11631
|
-
|
|
11715
|
+
i2 = decodeInteger(mappings, i2, state, 0);
|
|
11632
11716
|
const col = state[0];
|
|
11633
11717
|
if (col < lastCol)
|
|
11634
11718
|
sorted = false;
|
|
11635
11719
|
lastCol = col;
|
|
11636
|
-
if (hasMoreVlq(mappings,
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
if (hasMoreVlq(mappings,
|
|
11641
|
-
|
|
11720
|
+
if (hasMoreVlq(mappings, i2, semi)) {
|
|
11721
|
+
i2 = decodeInteger(mappings, i2, state, 1);
|
|
11722
|
+
i2 = decodeInteger(mappings, i2, state, 2);
|
|
11723
|
+
i2 = decodeInteger(mappings, i2, state, 3);
|
|
11724
|
+
if (hasMoreVlq(mappings, i2, semi)) {
|
|
11725
|
+
i2 = decodeInteger(mappings, i2, state, 4);
|
|
11642
11726
|
seg = [col, state[1], state[2], state[3], state[4]];
|
|
11643
11727
|
} else {
|
|
11644
11728
|
seg = [col, state[1], state[2], state[3]];
|
|
@@ -11664,8 +11748,8 @@ function decodeInteger(mappings, pos, state, j) {
|
|
|
11664
11748
|
let shift = 0;
|
|
11665
11749
|
let integer = 0;
|
|
11666
11750
|
do {
|
|
11667
|
-
const
|
|
11668
|
-
integer = charToInt2[
|
|
11751
|
+
const c2 = mappings.charCodeAt(pos++);
|
|
11752
|
+
integer = charToInt2[c2];
|
|
11669
11753
|
value |= (integer & 31) << shift;
|
|
11670
11754
|
shift += 5;
|
|
11671
11755
|
} while (integer & 32);
|
|
@@ -11677,10 +11761,10 @@ function decodeInteger(mappings, pos, state, j) {
|
|
|
11677
11761
|
state[j] += value;
|
|
11678
11762
|
return pos;
|
|
11679
11763
|
}
|
|
11680
|
-
function hasMoreVlq(mappings,
|
|
11681
|
-
if (
|
|
11764
|
+
function hasMoreVlq(mappings, i2, length) {
|
|
11765
|
+
if (i2 >= length)
|
|
11682
11766
|
return false;
|
|
11683
|
-
return mappings.charCodeAt(
|
|
11767
|
+
return mappings.charCodeAt(i2) !== comma2;
|
|
11684
11768
|
}
|
|
11685
11769
|
function sort(line) {
|
|
11686
11770
|
line.sort(sortComparator$1);
|
|
@@ -11781,8 +11865,8 @@ function normalizePath(url, type2) {
|
|
|
11781
11865
|
let pointer = 1;
|
|
11782
11866
|
let positive = 0;
|
|
11783
11867
|
let addTrailingSlash = false;
|
|
11784
|
-
for (let
|
|
11785
|
-
const piece = pieces[
|
|
11868
|
+
for (let i2 = 1; i2 < pieces.length; i2++) {
|
|
11869
|
+
const piece = pieces[i2];
|
|
11786
11870
|
if (!piece) {
|
|
11787
11871
|
addTrailingSlash = true;
|
|
11788
11872
|
continue;
|
|
@@ -11804,8 +11888,8 @@ function normalizePath(url, type2) {
|
|
|
11804
11888
|
positive++;
|
|
11805
11889
|
}
|
|
11806
11890
|
let path2 = "";
|
|
11807
|
-
for (let
|
|
11808
|
-
path2 += "/" + pieces[
|
|
11891
|
+
for (let i2 = 1; i2 < pointer; i2++) {
|
|
11892
|
+
path2 += "/" + pieces[i2];
|
|
11809
11893
|
}
|
|
11810
11894
|
if (!path2 || addTrailingSlash && !path2.endsWith("/..")) {
|
|
11811
11895
|
path2 += "/";
|
|
@@ -11881,15 +11965,15 @@ function maybeSort(mappings, owned) {
|
|
|
11881
11965
|
return mappings;
|
|
11882
11966
|
if (!owned)
|
|
11883
11967
|
mappings = mappings.slice();
|
|
11884
|
-
for (let
|
|
11885
|
-
mappings[
|
|
11968
|
+
for (let i2 = unsortedIndex; i2 < mappings.length; i2 = nextUnsortedSegmentLine(mappings, i2 + 1)) {
|
|
11969
|
+
mappings[i2] = sortSegments(mappings[i2], owned);
|
|
11886
11970
|
}
|
|
11887
11971
|
return mappings;
|
|
11888
11972
|
}
|
|
11889
11973
|
function nextUnsortedSegmentLine(mappings, start) {
|
|
11890
|
-
for (let
|
|
11891
|
-
if (!isSorted(mappings[
|
|
11892
|
-
return
|
|
11974
|
+
for (let i2 = start; i2 < mappings.length; i2++) {
|
|
11975
|
+
if (!isSorted(mappings[i2]))
|
|
11976
|
+
return i2;
|
|
11893
11977
|
}
|
|
11894
11978
|
return mappings.length;
|
|
11895
11979
|
}
|
|
@@ -11928,15 +12012,15 @@ function binarySearch(haystack, needle, low, high) {
|
|
|
11928
12012
|
return low - 1;
|
|
11929
12013
|
}
|
|
11930
12014
|
function upperBound(haystack, needle, index) {
|
|
11931
|
-
for (let
|
|
11932
|
-
if (haystack[
|
|
12015
|
+
for (let i2 = index + 1; i2 < haystack.length; index = i2++) {
|
|
12016
|
+
if (haystack[i2][COLUMN] !== needle)
|
|
11933
12017
|
break;
|
|
11934
12018
|
}
|
|
11935
12019
|
return index;
|
|
11936
12020
|
}
|
|
11937
12021
|
function lowerBound(haystack, needle, index) {
|
|
11938
|
-
for (let
|
|
11939
|
-
if (haystack[
|
|
12022
|
+
for (let i2 = index - 1; i2 >= 0; index = i2--) {
|
|
12023
|
+
if (haystack[i2][COLUMN] !== needle)
|
|
11940
12024
|
break;
|
|
11941
12025
|
}
|
|
11942
12026
|
return index;
|
|
@@ -12124,7 +12208,7 @@ function parseStacktrace(stack, options = {}) {
|
|
|
12124
12208
|
const { ignoreStackEntries = stackIgnorePatterns } = options;
|
|
12125
12209
|
let stacks = !CHROME_IE_STACK_REGEXP.test(stack) ? parseFFOrSafariStackTrace(stack) : parseV8Stacktrace(stack);
|
|
12126
12210
|
if (ignoreStackEntries.length)
|
|
12127
|
-
stacks = stacks.filter((stack2) => !ignoreStackEntries.some((
|
|
12211
|
+
stacks = stacks.filter((stack2) => !ignoreStackEntries.some((p) => stack2.file.match(p)));
|
|
12128
12212
|
return stacks.map((stack2) => {
|
|
12129
12213
|
var _a2;
|
|
12130
12214
|
const map2 = (_a2 = options.getSourceMap) == null ? void 0 : _a2.call(options, stack2.file);
|
|
@@ -12151,15 +12235,15 @@ function parseErrorStacktrace(e, options = {}) {
|
|
|
12151
12235
|
const stackStr = e.stack || e.stackStr || "";
|
|
12152
12236
|
let stackFrames = parseStacktrace(stackStr, options);
|
|
12153
12237
|
if (options.frameFilter)
|
|
12154
|
-
stackFrames = stackFrames.filter((
|
|
12238
|
+
stackFrames = stackFrames.filter((f2) => options.frameFilter(e, f2) !== false);
|
|
12155
12239
|
e.stacks = stackFrames;
|
|
12156
12240
|
return stackFrames;
|
|
12157
12241
|
}
|
|
12158
12242
|
async function saveInlineSnapshots(environment, snapshots) {
|
|
12159
12243
|
const MagicString2 = (await Promise.resolve().then(() => (init_magic_string_es(), magic_string_es_exports))).default;
|
|
12160
|
-
const files = new Set(snapshots.map((
|
|
12244
|
+
const files = new Set(snapshots.map((i2) => i2.file));
|
|
12161
12245
|
await Promise.all(Array.from(files).map(async (file) => {
|
|
12162
|
-
const snaps = snapshots.filter((
|
|
12246
|
+
const snaps = snapshots.filter((i2) => i2.file === file);
|
|
12163
12247
|
const code = await environment.readSnapshotFile(file);
|
|
12164
12248
|
const s = new MagicString2(code);
|
|
12165
12249
|
for (const snap of snaps) {
|
|
@@ -12215,7 +12299,7 @@ function prepareSnapString(snap, source, index) {
|
|
|
12215
12299
|
if (isOneline)
|
|
12216
12300
|
return `${quote}${lines.join("\n").replace(/`/g, "\\`").replace(/\${/g, "\\${")}${quote}`;
|
|
12217
12301
|
return `${quote}
|
|
12218
|
-
${lines.map((
|
|
12302
|
+
${lines.map((i2) => i2 ? indentNext + i2 : "").join("\n").replace(/`/g, "\\`").replace(/\${/g, "\\${")}
|
|
12219
12303
|
${indent}${quote}`;
|
|
12220
12304
|
}
|
|
12221
12305
|
var startRegex = /(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\S\s]*\*\/\s*|\/\/.*\s+)*\s*[\w_$]*(['"`\)])/m;
|
|
@@ -12254,12 +12338,12 @@ function stripSnapshotIndentation(inlineSnapshot) {
|
|
|
12254
12338
|
if (lines[0].trim() !== "" || lines[lines.length - 1].trim() !== "") {
|
|
12255
12339
|
return inlineSnapshot;
|
|
12256
12340
|
}
|
|
12257
|
-
for (let
|
|
12258
|
-
if (lines[
|
|
12259
|
-
if (lines[
|
|
12341
|
+
for (let i2 = 1; i2 < lines.length - 1; i2++) {
|
|
12342
|
+
if (lines[i2] !== "") {
|
|
12343
|
+
if (lines[i2].indexOf(indentation) !== 0) {
|
|
12260
12344
|
return inlineSnapshot;
|
|
12261
12345
|
}
|
|
12262
|
-
lines[
|
|
12346
|
+
lines[i2] = lines[i2].substring(indentation.length);
|
|
12263
12347
|
}
|
|
12264
12348
|
}
|
|
12265
12349
|
lines[lines.length - 1] = "";
|
|
@@ -12332,10 +12416,10 @@ var SnapshotState = class _SnapshotState {
|
|
|
12332
12416
|
});
|
|
12333
12417
|
}
|
|
12334
12418
|
_inferInlineSnapshotStack(stacks) {
|
|
12335
|
-
const promiseIndex = stacks.findIndex((
|
|
12419
|
+
const promiseIndex = stacks.findIndex((i2) => i2.method.match(/__VITEST_(RESOLVES|REJECTS)__/));
|
|
12336
12420
|
if (promiseIndex !== -1)
|
|
12337
12421
|
return stacks[promiseIndex + 3];
|
|
12338
|
-
const stackIndex = stacks.findIndex((
|
|
12422
|
+
const stackIndex = stacks.findIndex((i2) => i2.method.includes("__INLINE_SNAPSHOT__"));
|
|
12339
12423
|
return stackIndex !== -1 ? stacks[stackIndex + 2] : null;
|
|
12340
12424
|
}
|
|
12341
12425
|
_addSnapshot(key, receivedSerialized, options) {
|
|
@@ -12742,17 +12826,17 @@ function normalizeString2(path2, allowAboveRoot) {
|
|
|
12742
12826
|
}
|
|
12743
12827
|
return res;
|
|
12744
12828
|
}
|
|
12745
|
-
var isAbsolute2 = function(
|
|
12746
|
-
return _IS_ABSOLUTE_RE2.test(
|
|
12829
|
+
var isAbsolute2 = function(p) {
|
|
12830
|
+
return _IS_ABSOLUTE_RE2.test(p);
|
|
12747
12831
|
};
|
|
12748
12832
|
var comma3 = ",".charCodeAt(0);
|
|
12749
12833
|
var chars3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
12750
12834
|
var intToChar3 = new Uint8Array(64);
|
|
12751
12835
|
var charToInt3 = new Uint8Array(128);
|
|
12752
|
-
for (let
|
|
12753
|
-
const
|
|
12754
|
-
intToChar3[
|
|
12755
|
-
charToInt3[
|
|
12836
|
+
for (let i2 = 0; i2 < chars3.length; i2++) {
|
|
12837
|
+
const c2 = chars3.charCodeAt(i2);
|
|
12838
|
+
intToChar3[i2] = c2;
|
|
12839
|
+
charToInt3[c2] = i2;
|
|
12756
12840
|
}
|
|
12757
12841
|
function decode2(mappings) {
|
|
12758
12842
|
const state = new Int32Array(5);
|
|
@@ -12764,19 +12848,19 @@ function decode2(mappings) {
|
|
|
12764
12848
|
let sorted = true;
|
|
12765
12849
|
let lastCol = 0;
|
|
12766
12850
|
state[0] = 0;
|
|
12767
|
-
for (let
|
|
12851
|
+
for (let i2 = index; i2 < semi; i2++) {
|
|
12768
12852
|
let seg;
|
|
12769
|
-
|
|
12853
|
+
i2 = decodeInteger2(mappings, i2, state, 0);
|
|
12770
12854
|
const col = state[0];
|
|
12771
12855
|
if (col < lastCol)
|
|
12772
12856
|
sorted = false;
|
|
12773
12857
|
lastCol = col;
|
|
12774
|
-
if (hasMoreVlq2(mappings,
|
|
12775
|
-
|
|
12776
|
-
|
|
12777
|
-
|
|
12778
|
-
if (hasMoreVlq2(mappings,
|
|
12779
|
-
|
|
12858
|
+
if (hasMoreVlq2(mappings, i2, semi)) {
|
|
12859
|
+
i2 = decodeInteger2(mappings, i2, state, 1);
|
|
12860
|
+
i2 = decodeInteger2(mappings, i2, state, 2);
|
|
12861
|
+
i2 = decodeInteger2(mappings, i2, state, 3);
|
|
12862
|
+
if (hasMoreVlq2(mappings, i2, semi)) {
|
|
12863
|
+
i2 = decodeInteger2(mappings, i2, state, 4);
|
|
12780
12864
|
seg = [col, state[1], state[2], state[3], state[4]];
|
|
12781
12865
|
} else {
|
|
12782
12866
|
seg = [col, state[1], state[2], state[3]];
|
|
@@ -12802,8 +12886,8 @@ function decodeInteger2(mappings, pos, state, j) {
|
|
|
12802
12886
|
let shift = 0;
|
|
12803
12887
|
let integer = 0;
|
|
12804
12888
|
do {
|
|
12805
|
-
const
|
|
12806
|
-
integer = charToInt3[
|
|
12889
|
+
const c2 = mappings.charCodeAt(pos++);
|
|
12890
|
+
integer = charToInt3[c2];
|
|
12807
12891
|
value |= (integer & 31) << shift;
|
|
12808
12892
|
shift += 5;
|
|
12809
12893
|
} while (integer & 32);
|
|
@@ -12815,10 +12899,10 @@ function decodeInteger2(mappings, pos, state, j) {
|
|
|
12815
12899
|
state[j] += value;
|
|
12816
12900
|
return pos;
|
|
12817
12901
|
}
|
|
12818
|
-
function hasMoreVlq2(mappings,
|
|
12819
|
-
if (
|
|
12902
|
+
function hasMoreVlq2(mappings, i2, length) {
|
|
12903
|
+
if (i2 >= length)
|
|
12820
12904
|
return false;
|
|
12821
|
-
return mappings.charCodeAt(
|
|
12905
|
+
return mappings.charCodeAt(i2) !== comma3;
|
|
12822
12906
|
}
|
|
12823
12907
|
function sort2(line) {
|
|
12824
12908
|
line.sort(sortComparator$12);
|
|
@@ -12862,15 +12946,15 @@ function binarySearch2(haystack, needle, low, high) {
|
|
|
12862
12946
|
return low - 1;
|
|
12863
12947
|
}
|
|
12864
12948
|
function upperBound2(haystack, needle, index) {
|
|
12865
|
-
for (let
|
|
12866
|
-
if (haystack[
|
|
12949
|
+
for (let i2 = index + 1; i2 < haystack.length; index = i2++) {
|
|
12950
|
+
if (haystack[i2][COLUMN2] !== needle)
|
|
12867
12951
|
break;
|
|
12868
12952
|
}
|
|
12869
12953
|
return index;
|
|
12870
12954
|
}
|
|
12871
12955
|
function lowerBound2(haystack, needle, index) {
|
|
12872
|
-
for (let
|
|
12873
|
-
if (haystack[
|
|
12956
|
+
for (let i2 = index - 1; i2 >= 0; index = i2--) {
|
|
12957
|
+
if (haystack[i2][COLUMN2] !== needle)
|
|
12874
12958
|
break;
|
|
12875
12959
|
}
|
|
12876
12960
|
return index;
|
|
@@ -12903,8 +12987,8 @@ function memoizedBinarySearch2(haystack, needle, state, key) {
|
|
|
12903
12987
|
}
|
|
12904
12988
|
function buildBySources(decoded, memos) {
|
|
12905
12989
|
const sources = memos.map(buildNullArray);
|
|
12906
|
-
for (let
|
|
12907
|
-
const line = decoded[
|
|
12990
|
+
for (let i2 = 0; i2 < decoded.length; i2++) {
|
|
12991
|
+
const line = decoded[i2];
|
|
12908
12992
|
for (let j = 0; j < line.length; j++) {
|
|
12909
12993
|
const seg = line[j];
|
|
12910
12994
|
if (seg.length === 1)
|
|
@@ -12916,14 +13000,14 @@ function buildBySources(decoded, memos) {
|
|
|
12916
13000
|
const originalLine = originalSource[sourceLine] || (originalSource[sourceLine] = []);
|
|
12917
13001
|
const memo = memos[sourceIndex];
|
|
12918
13002
|
const index = upperBound2(originalLine, sourceColumn, memoizedBinarySearch2(originalLine, sourceColumn, memo, sourceLine));
|
|
12919
|
-
insert(originalLine, memo.lastIndex = index + 1, [sourceColumn,
|
|
13003
|
+
insert(originalLine, memo.lastIndex = index + 1, [sourceColumn, i2, seg[COLUMN2]]);
|
|
12920
13004
|
}
|
|
12921
13005
|
}
|
|
12922
13006
|
return sources;
|
|
12923
13007
|
}
|
|
12924
13008
|
function insert(array2, index, value) {
|
|
12925
|
-
for (let
|
|
12926
|
-
array2[
|
|
13009
|
+
for (let i2 = array2.length; i2 > index; i2--) {
|
|
13010
|
+
array2[i2] = array2[i2 - 1];
|
|
12927
13011
|
}
|
|
12928
13012
|
array2[index] = value;
|
|
12929
13013
|
}
|
|
@@ -13097,7 +13181,7 @@ function parseSingleV8Stack2(raw) {
|
|
|
13097
13181
|
};
|
|
13098
13182
|
}
|
|
13099
13183
|
|
|
13100
|
-
// ../../node_modules/vitest/dist/vendor/base.
|
|
13184
|
+
// ../../node_modules/vitest/dist/vendor/base.N3JkKp7j.js
|
|
13101
13185
|
init_cjs_shims();
|
|
13102
13186
|
function isChildProcess() {
|
|
13103
13187
|
return typeof process !== "undefined" && !!process.send;
|
|
@@ -13108,7 +13192,7 @@ init_cjs_shims();
|
|
|
13108
13192
|
var RealDate = Date;
|
|
13109
13193
|
var now2 = null;
|
|
13110
13194
|
var MockDate = class _MockDate extends RealDate {
|
|
13111
|
-
constructor(
|
|
13195
|
+
constructor(y, m, d, h, M2, s, ms) {
|
|
13112
13196
|
super();
|
|
13113
13197
|
let date;
|
|
13114
13198
|
switch (arguments.length) {
|
|
@@ -13119,15 +13203,15 @@ var MockDate = class _MockDate extends RealDate {
|
|
|
13119
13203
|
date = new RealDate();
|
|
13120
13204
|
break;
|
|
13121
13205
|
case 1:
|
|
13122
|
-
date = new RealDate(
|
|
13206
|
+
date = new RealDate(y);
|
|
13123
13207
|
break;
|
|
13124
13208
|
default:
|
|
13125
|
-
|
|
13209
|
+
d = typeof d === "undefined" ? 1 : d;
|
|
13126
13210
|
h = h || 0;
|
|
13127
13211
|
M2 = M2 || 0;
|
|
13128
13212
|
s = s || 0;
|
|
13129
13213
|
ms = ms || 0;
|
|
13130
|
-
date = new RealDate(
|
|
13214
|
+
date = new RealDate(y, m, d, h, M2, s, ms);
|
|
13131
13215
|
break;
|
|
13132
13216
|
}
|
|
13133
13217
|
Object.setPrototypeOf(date, _MockDate.prototype);
|
|
@@ -13155,7 +13239,7 @@ function resetDate() {
|
|
|
13155
13239
|
globalThis.Date = RealDate;
|
|
13156
13240
|
}
|
|
13157
13241
|
|
|
13158
|
-
// ../../node_modules/vitest/dist/vendor/vi.
|
|
13242
|
+
// ../../node_modules/vitest/dist/vendor/vi.C5mroSoP.js
|
|
13159
13243
|
function resetModules(modules, resetMocks = false) {
|
|
13160
13244
|
const skipPaths = [
|
|
13161
13245
|
// Vitest
|
|
@@ -13889,8 +13973,8 @@ function withGlobal(_global) {
|
|
|
13889
13973
|
return isFinite(num);
|
|
13890
13974
|
}
|
|
13891
13975
|
let isNearInfiniteLimit = false;
|
|
13892
|
-
function checkIsNearInfiniteLimit(clock,
|
|
13893
|
-
if (clock.loopLimit &&
|
|
13976
|
+
function checkIsNearInfiniteLimit(clock, i2) {
|
|
13977
|
+
if (clock.loopLimit && i2 === clock.loopLimit - 1) {
|
|
13894
13978
|
isNearInfiniteLimit = true;
|
|
13895
13979
|
}
|
|
13896
13980
|
}
|
|
@@ -13903,7 +13987,7 @@ function withGlobal(_global) {
|
|
|
13903
13987
|
}
|
|
13904
13988
|
const strings = str.split(":");
|
|
13905
13989
|
const l = strings.length;
|
|
13906
|
-
let
|
|
13990
|
+
let i2 = l;
|
|
13907
13991
|
let ms = 0;
|
|
13908
13992
|
let parsed;
|
|
13909
13993
|
if (l > 3 || !/^(\d\d:){0,2}\d\d?$/.test(str)) {
|
|
@@ -13911,12 +13995,12 @@ function withGlobal(_global) {
|
|
|
13911
13995
|
"tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits"
|
|
13912
13996
|
);
|
|
13913
13997
|
}
|
|
13914
|
-
while (
|
|
13915
|
-
parsed = parseInt(strings[
|
|
13998
|
+
while (i2--) {
|
|
13999
|
+
parsed = parseInt(strings[i2], 10);
|
|
13916
14000
|
if (parsed >= 60) {
|
|
13917
14001
|
throw new Error(`Invalid time ${str}`);
|
|
13918
14002
|
}
|
|
13919
|
-
ms += parsed * Math.pow(60, l -
|
|
14003
|
+
ms += parsed * Math.pow(60, l - i2 - 1);
|
|
13920
14004
|
}
|
|
13921
14005
|
return ms * 1e3;
|
|
13922
14006
|
}
|
|
@@ -13958,15 +14042,15 @@ function withGlobal(_global) {
|
|
|
13958
14042
|
);
|
|
13959
14043
|
}
|
|
13960
14044
|
let matchedLineIndex = -1;
|
|
13961
|
-
job.error.stack.split("\n").some(function(line,
|
|
14045
|
+
job.error.stack.split("\n").some(function(line, i2) {
|
|
13962
14046
|
const matchedComputedTarget = line.match(computedTargetPattern);
|
|
13963
14047
|
if (matchedComputedTarget) {
|
|
13964
|
-
matchedLineIndex =
|
|
14048
|
+
matchedLineIndex = i2;
|
|
13965
14049
|
return true;
|
|
13966
14050
|
}
|
|
13967
14051
|
const matchedClockMethod = line.match(clockMethodPattern);
|
|
13968
14052
|
if (matchedClockMethod) {
|
|
13969
|
-
matchedLineIndex =
|
|
14053
|
+
matchedLineIndex = i2;
|
|
13970
14054
|
return false;
|
|
13971
14055
|
}
|
|
13972
14056
|
return matchedLineIndex >= 0;
|
|
@@ -14087,11 +14171,11 @@ ${job.error.stack.split("\n").slice(matchedLineIndex + 1).join("\n")}`;
|
|
|
14087
14171
|
if (!clock.jobs) {
|
|
14088
14172
|
return;
|
|
14089
14173
|
}
|
|
14090
|
-
for (let
|
|
14091
|
-
const job = clock.jobs[
|
|
14174
|
+
for (let i2 = 0; i2 < clock.jobs.length; i2++) {
|
|
14175
|
+
const job = clock.jobs[i2];
|
|
14092
14176
|
job.func.apply(null, job.args);
|
|
14093
|
-
checkIsNearInfiniteLimit(clock,
|
|
14094
|
-
if (clock.loopLimit &&
|
|
14177
|
+
checkIsNearInfiniteLimit(clock, i2);
|
|
14178
|
+
if (clock.loopLimit && i2 > clock.loopLimit) {
|
|
14095
14179
|
throw getInfiniteLoopError(clock, job);
|
|
14096
14180
|
}
|
|
14097
14181
|
}
|
|
@@ -14302,11 +14386,11 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
14302
14386
|
}
|
|
14303
14387
|
}
|
|
14304
14388
|
function uninstall(clock, config2) {
|
|
14305
|
-
let method,
|
|
14389
|
+
let method, i2, l;
|
|
14306
14390
|
const installedHrTime = "_hrtime";
|
|
14307
14391
|
const installedNextTick = "_nextTick";
|
|
14308
|
-
for (
|
|
14309
|
-
method = clock.methods[
|
|
14392
|
+
for (i2 = 0, l = clock.methods.length; i2 < l; i2++) {
|
|
14393
|
+
method = clock.methods[i2];
|
|
14310
14394
|
if (method === "hrtime" && _global.process) {
|
|
14311
14395
|
_global.process.hrtime = clock[installedHrTime];
|
|
14312
14396
|
} else if (method === "nextTick" && _global.process) {
|
|
@@ -14755,9 +14839,9 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
14755
14839
|
};
|
|
14756
14840
|
}
|
|
14757
14841
|
clock.runAll = function runAll() {
|
|
14758
|
-
let numTimers,
|
|
14842
|
+
let numTimers, i2;
|
|
14759
14843
|
runJobs(clock);
|
|
14760
|
-
for (
|
|
14844
|
+
for (i2 = 0; i2 < clock.loopLimit; i2++) {
|
|
14761
14845
|
if (!clock.timers) {
|
|
14762
14846
|
resetIsNearInfiniteLimit();
|
|
14763
14847
|
return clock.now;
|
|
@@ -14768,7 +14852,7 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
14768
14852
|
return clock.now;
|
|
14769
14853
|
}
|
|
14770
14854
|
clock.next();
|
|
14771
|
-
checkIsNearInfiniteLimit(clock,
|
|
14855
|
+
checkIsNearInfiniteLimit(clock, i2);
|
|
14772
14856
|
}
|
|
14773
14857
|
const excessJob = firstTimer(clock);
|
|
14774
14858
|
throw getInfiniteLoopError(clock, excessJob);
|
|
@@ -14779,12 +14863,12 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
14779
14863
|
if (typeof _global.Promise !== "undefined") {
|
|
14780
14864
|
clock.runAllAsync = function runAllAsync() {
|
|
14781
14865
|
return new _global.Promise(function(resolve3, reject) {
|
|
14782
|
-
let
|
|
14866
|
+
let i2 = 0;
|
|
14783
14867
|
function doRun() {
|
|
14784
14868
|
originalSetTimeout(function() {
|
|
14785
14869
|
try {
|
|
14786
14870
|
let numTimers;
|
|
14787
|
-
if (
|
|
14871
|
+
if (i2 < clock.loopLimit) {
|
|
14788
14872
|
if (!clock.timers) {
|
|
14789
14873
|
resetIsNearInfiniteLimit();
|
|
14790
14874
|
resolve3(clock.now);
|
|
@@ -14799,9 +14883,9 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
14799
14883
|
return;
|
|
14800
14884
|
}
|
|
14801
14885
|
clock.next();
|
|
14802
|
-
|
|
14886
|
+
i2++;
|
|
14803
14887
|
doRun();
|
|
14804
|
-
checkIsNearInfiniteLimit(clock,
|
|
14888
|
+
checkIsNearInfiniteLimit(clock, i2);
|
|
14805
14889
|
return;
|
|
14806
14890
|
}
|
|
14807
14891
|
const excessJob = firstTimer(clock);
|
|
@@ -14903,7 +14987,7 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
14903
14987
|
"config.target is no longer supported. Use `withGlobal(target)` instead."
|
|
14904
14988
|
);
|
|
14905
14989
|
}
|
|
14906
|
-
let
|
|
14990
|
+
let i2, l;
|
|
14907
14991
|
const clock = createClock(config2.now, config2.loopLimit);
|
|
14908
14992
|
clock.shouldClearNativeTimers = config2.shouldClearNativeTimers;
|
|
14909
14993
|
clock.uninstall = function() {
|
|
@@ -14951,8 +15035,8 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`
|
|
|
14951
15035
|
if (_global === globalObject && timersModule) {
|
|
14952
15036
|
clock.timersModuleMethods = [];
|
|
14953
15037
|
}
|
|
14954
|
-
for (
|
|
14955
|
-
const nameOfMethodToReplace = clock.methods[
|
|
15038
|
+
for (i2 = 0, l = clock.methods.length; i2 < l; i2++) {
|
|
15039
|
+
const nameOfMethodToReplace = clock.methods[i2];
|
|
14956
15040
|
if (nameOfMethodToReplace === "hrtime") {
|
|
14957
15041
|
if (_global.process && typeof _global.process.hrtime === "function") {
|
|
14958
15042
|
hijackMethod(_global.process, nameOfMethodToReplace, clock);
|
|
@@ -14988,6 +15072,7 @@ defaultImplementation.createClock;
|
|
|
14988
15072
|
defaultImplementation.install;
|
|
14989
15073
|
var withGlobal_1 = withGlobal;
|
|
14990
15074
|
var FakeTimers = class {
|
|
15075
|
+
_global;
|
|
14991
15076
|
_clock;
|
|
14992
15077
|
_fakingTime;
|
|
14993
15078
|
_fakingDate;
|
|
@@ -15002,6 +15087,7 @@ var FakeTimers = class {
|
|
|
15002
15087
|
this._fakingDate = false;
|
|
15003
15088
|
this._fakingTime = false;
|
|
15004
15089
|
this._fakeTimers = withGlobal_1(global3);
|
|
15090
|
+
this._global = global3;
|
|
15005
15091
|
}
|
|
15006
15092
|
clearAllTimers() {
|
|
15007
15093
|
if (this._fakingTime)
|
|
@@ -15028,7 +15114,7 @@ var FakeTimers = class {
|
|
|
15028
15114
|
}
|
|
15029
15115
|
advanceTimersToNextTimer(steps = 1) {
|
|
15030
15116
|
if (this._checkFakeTimers()) {
|
|
15031
|
-
for (let
|
|
15117
|
+
for (let i2 = steps; i2 > 0; i2--) {
|
|
15032
15118
|
this._clock.next();
|
|
15033
15119
|
this._clock.tick(0);
|
|
15034
15120
|
if (this._clock.countTimers() === 0)
|
|
@@ -15038,7 +15124,7 @@ var FakeTimers = class {
|
|
|
15038
15124
|
}
|
|
15039
15125
|
async advanceTimersToNextTimerAsync(steps = 1) {
|
|
15040
15126
|
if (this._checkFakeTimers()) {
|
|
15041
|
-
for (let
|
|
15127
|
+
for (let i2 = steps; i2 > 0; i2--) {
|
|
15042
15128
|
await this._clock.nextAsync();
|
|
15043
15129
|
this._clock.tick(0);
|
|
15044
15130
|
if (this._clock.countTimers() === 0)
|
|
@@ -15082,11 +15168,11 @@ var FakeTimers = class {
|
|
|
15082
15168
|
throw new Error("process.nextTick cannot be mocked inside child_process");
|
|
15083
15169
|
const existingFakedMethods = (((_c = this._userConfig) == null ? void 0 : _c.toFake) || toFake).filter((method) => {
|
|
15084
15170
|
switch (method) {
|
|
15085
|
-
case "
|
|
15086
|
-
case "
|
|
15087
|
-
return
|
|
15171
|
+
case "setImmediate":
|
|
15172
|
+
case "clearImmediate":
|
|
15173
|
+
return method in this._global && this._global[method];
|
|
15088
15174
|
default:
|
|
15089
|
-
return
|
|
15175
|
+
return true;
|
|
15090
15176
|
}
|
|
15091
15177
|
});
|
|
15092
15178
|
this._clock = this._fakeTimers.install({
|
|
@@ -15398,6 +15484,7 @@ function createVitest() {
|
|
|
15398
15484
|
async importMock(path2) {
|
|
15399
15485
|
return _mocker.importMock(path2, getImporter());
|
|
15400
15486
|
},
|
|
15487
|
+
// this is typed in the interface so it's not necessary to type it here
|
|
15401
15488
|
mocked(item, _options = {}) {
|
|
15402
15489
|
return item;
|
|
15403
15490
|
},
|
|
@@ -15475,7 +15562,7 @@ function createVitest() {
|
|
|
15475
15562
|
var vitest = createVitest();
|
|
15476
15563
|
var vi = vitest;
|
|
15477
15564
|
|
|
15478
|
-
// ../../node_modules/vitest/dist/vendor/index.
|
|
15565
|
+
// ../../node_modules/vitest/dist/vendor/index.JZMafwT-.js
|
|
15479
15566
|
init_cjs_shims();
|
|
15480
15567
|
function getRunningMode() {
|
|
15481
15568
|
return process.env.VITEST_MODE === "WATCH" ? "watch" : "run";
|
|
@@ -15561,6 +15648,7 @@ var VitestIndex = /* @__PURE__ */ Object.freeze({
|
|
|
15561
15648
|
isWatchMode,
|
|
15562
15649
|
it,
|
|
15563
15650
|
onTestFailed,
|
|
15651
|
+
onTestFinished,
|
|
15564
15652
|
runOnce,
|
|
15565
15653
|
should,
|
|
15566
15654
|
suite,
|