@noma.to/qwik-testing-library 1.2.0 → 1.3.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/README.md +4 -3
- package/lib/lib/mock.qwik.cjs +3 -3
- package/lib/lib/mock.qwik.mjs +1 -1
- package/lib/lib/qwikloader.qwik.cjs +1 -1
- package/lib/lib/qwikloader.qwik.mjs +1 -1
- package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.qwik.cjs +89 -0
- package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.qwik.mjs +89 -0
- package/lib/node_modules/.pnpm/{@vitest_expect@2.1.1 → @vitest_expect@2.1.8}/node_modules/@vitest/expect/dist/index.qwik.cjs +155 -71
- package/lib/node_modules/.pnpm/{@vitest_expect@2.1.1 → @vitest_expect@2.1.8}/node_modules/@vitest/expect/dist/index.qwik.mjs +148 -64
- package/lib/node_modules/.pnpm/{@vitest_pretty-format@2.1.1 → @vitest_pretty-format@2.1.8}/node_modules/@vitest/pretty-format/dist/index.qwik.cjs +11 -5
- package/lib/node_modules/.pnpm/{@vitest_pretty-format@2.1.1 → @vitest_pretty-format@2.1.8}/node_modules/@vitest/pretty-format/dist/index.qwik.mjs +11 -5
- package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@2.1.8}/node_modules/@vitest/runner/dist/chunk-tasks.qwik.cjs +2 -2
- package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@2.1.8}/node_modules/@vitest/runner/dist/chunk-tasks.qwik.mjs +2 -2
- package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@2.1.8}/node_modules/@vitest/runner/dist/index.qwik.cjs +34 -28
- package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@2.1.8}/node_modules/@vitest/runner/dist/index.qwik.mjs +31 -25
- package/lib/node_modules/.pnpm/{@vitest_snapshot@2.1.1 → @vitest_snapshot@2.1.8}/node_modules/@vitest/snapshot/dist/index.qwik.cjs +863 -460
- package/lib/node_modules/.pnpm/{@vitest_snapshot@2.1.1 → @vitest_snapshot@2.1.8}/node_modules/@vitest/snapshot/dist/index.qwik.mjs +863 -460
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/chunk-display.qwik.cjs → @vitest_utils@2.1.8/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.cjs} +6 -2
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/chunk-display.qwik.mjs → @vitest_utils@2.1.8/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.mjs} +6 -2
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/diff.qwik.cjs +458 -450
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/diff.qwik.mjs +456 -448
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/error.qwik.cjs +5 -5
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/error.qwik.mjs +2 -2
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/helpers.qwik.cjs +1 -1
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/helpers.qwik.mjs +1 -1
- package/lib/node_modules/.pnpm/@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/index.qwik.cjs +472 -0
- package/lib/node_modules/.pnpm/@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/index.qwik.mjs +472 -0
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/source-map.qwik.cjs +20 -20
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@2.1.8}/node_modules/@vitest/utils/dist/source-map.qwik.mjs +20 -20
- package/lib/node_modules/.pnpm/{chai@5.1.1 → chai@5.1.2}/node_modules/chai/chai.qwik.cjs +71 -39
- package/lib/node_modules/.pnpm/{chai@5.1.1 → chai@5.1.2}/node_modules/chai/chai.qwik.mjs +71 -39
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/error.qwik.cjs +7 -1
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/error.qwik.mjs +7 -1
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/object.qwik.cjs +1 -1
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/object.qwik.mjs +1 -1
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/string.qwik.cjs +1 -2
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/string.qwik.mjs +1 -2
- package/lib/node_modules/.pnpm/{magic-string@0.30.11 → magic-string@0.30.17}/node_modules/magic-string/dist/magic-string.es.qwik.cjs +44 -33
- package/lib/node_modules/.pnpm/{magic-string@0.30.11 → magic-string@0.30.17}/node_modules/magic-string/dist/magic-string.es.qwik.mjs +44 -33
- package/lib/node_modules/.pnpm/vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.qwik.cjs +66 -0
- package/lib/node_modules/.pnpm/vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.qwik.mjs +66 -0
- package/lib/node_modules/.pnpm/vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.DgezovHB.qwik.cjs +2749 -0
- package/lib/node_modules/.pnpm/vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.DgezovHB.qwik.mjs +2749 -0
- package/package.json +13 -13
- package/lib/_virtual/_commonjsHelpers.qwik.cjs +0 -4
- package/lib/_virtual/_commonjsHelpers.qwik.mjs +0 -4
- package/lib/_virtual/sourcemap-codec.umd.qwik.cjs +0 -4
- package/lib/_virtual/sourcemap-codec.umd.qwik.mjs +0 -4
- package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.qwik.cjs +0 -425
- package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.qwik.mjs +0 -425
- package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/index.qwik.cjs +0 -81
- package/lib/node_modules/.pnpm/@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/index.qwik.mjs +0 -81
- package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/base.BlXpj3e_.qwik.cjs +0 -6
- package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/base.BlXpj3e_.qwik.mjs +0 -6
- package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/utils.Ck2hJTRs.qwik.cjs +0 -16
- package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/utils.Ck2hJTRs.qwik.mjs +0 -16
- package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/vi.D6IHiKAI.qwik.cjs +0 -2556
- package/lib/node_modules/.pnpm/vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1/node_modules/vitest/dist/chunks/vi.D6IHiKAI.qwik.mjs +0 -2556
- /package/lib/node_modules/.pnpm/{@vitest_spy@2.1.1 → @vitest_spy@2.1.8}/node_modules/@vitest/spy/dist/index.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{@vitest_spy@2.1.1 → @vitest_spy@2.1.8}/node_modules/@vitest/spy/dist/index.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/arguments.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/arguments.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/array.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/array.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/bigint.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/bigint.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/class.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/class.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/date.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/date.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/function.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/function.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/helpers.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/helpers.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/html.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/html.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/index.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/index.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/map.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/map.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/number.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/number.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/promise.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/promise.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/regexp.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/regexp.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/set.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/set.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/symbol.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/symbol.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/typedarray.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.2}/node_modules/loupe/lib/typedarray.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0}/node_modules/vitest/dist/chunks/date.W2xKR2qe.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{vitest@2.1.1_@types_node@22.7.4_@vitest_ui@2.1.1_jsdom@25.0.1 → vitest@2.1.8_@types_node@22.10.3_@vitest_ui@2.1.8_jsdom@26.0.0}/node_modules/vitest/dist/chunks/date.W2xKR2qe.qwik.mjs +0 -0
|
@@ -1,51 +1,19 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { diff, printDiffOrStringify } from "../../../../../@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/diff.qwik.mjs";
|
|
4
5
|
import f from "../../../../../tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/browser.qwik.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { s as stringify } from "../../../../../@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/chunk-display.qwik.mjs";
|
|
6
|
+
import { isMockFunction } from "../../../../../@vitest_spy@2.1.8/node_modules/@vitest/spy/dist/index.qwik.mjs";
|
|
7
|
+
import { processError } from "../../../../../@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/error.qwik.mjs";
|
|
8
|
+
import { use, util as utils_exports } from "../../../../../chai@5.1.2/node_modules/chai/chai.qwik.mjs";
|
|
9
|
+
import { getType, assertTypes, isObject } from "../../../../../@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/helpers.qwik.mjs";
|
|
10
|
+
import { s as stringify } from "../../../../../@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.mjs";
|
|
11
11
|
const MATCHERS_OBJECT = Symbol.for("matchers-object");
|
|
12
12
|
const JEST_MATCHERS_OBJECT = Symbol.for("$$jest-matchers-object");
|
|
13
13
|
const GLOBAL_EXPECT = Symbol.for("expect-global");
|
|
14
14
|
const ASYMMETRIC_MATCHERS_OBJECT = Symbol.for(
|
|
15
15
|
"asymmetric-matchers-object"
|
|
16
16
|
);
|
|
17
|
-
if (!Object.prototype.hasOwnProperty.call(globalThis, MATCHERS_OBJECT)) {
|
|
18
|
-
const globalState = /* @__PURE__ */ new WeakMap();
|
|
19
|
-
const matchers = /* @__PURE__ */ Object.create(null);
|
|
20
|
-
const customEqualityTesters = [];
|
|
21
|
-
const assymetricMatchers = /* @__PURE__ */ Object.create(null);
|
|
22
|
-
Object.defineProperty(globalThis, MATCHERS_OBJECT, {
|
|
23
|
-
get: () => globalState
|
|
24
|
-
});
|
|
25
|
-
Object.defineProperty(globalThis, JEST_MATCHERS_OBJECT, {
|
|
26
|
-
configurable: true,
|
|
27
|
-
get: () => ({
|
|
28
|
-
state: globalState.get(globalThis[GLOBAL_EXPECT]),
|
|
29
|
-
matchers,
|
|
30
|
-
customEqualityTesters
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
Object.defineProperty(globalThis, ASYMMETRIC_MATCHERS_OBJECT, {
|
|
34
|
-
get: () => assymetricMatchers
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function getState(expect) {
|
|
38
|
-
return globalThis[MATCHERS_OBJECT].get(expect);
|
|
39
|
-
}
|
|
40
|
-
function setState(state, expect) {
|
|
41
|
-
const map = globalThis[MATCHERS_OBJECT];
|
|
42
|
-
const current = map.get(expect) || {};
|
|
43
|
-
const results = Object.defineProperties(current, {
|
|
44
|
-
...Object.getOwnPropertyDescriptors(current),
|
|
45
|
-
...Object.getOwnPropertyDescriptors(state)
|
|
46
|
-
});
|
|
47
|
-
map.set(expect, results);
|
|
48
|
-
}
|
|
49
17
|
const EXPECTED_COLOR = f.green;
|
|
50
18
|
const RECEIVED_COLOR = f.red;
|
|
51
19
|
const INVERTED_COLOR = f.inverse;
|
|
@@ -209,6 +177,7 @@ function eq(a, b, aStack, bStack, customTesters, hasKey2) {
|
|
|
209
177
|
const numB = +b;
|
|
210
178
|
return numA === numB || Number.isNaN(numA) && Number.isNaN(numB);
|
|
211
179
|
}
|
|
180
|
+
// RegExps are compared by their source patterns and flags.
|
|
212
181
|
case "[object RegExp]":
|
|
213
182
|
return a.source === b.source && a.flags === b.flags;
|
|
214
183
|
}
|
|
@@ -510,7 +479,7 @@ function getObjectKeys(object) {
|
|
|
510
479
|
)
|
|
511
480
|
];
|
|
512
481
|
}
|
|
513
|
-
function getObjectSubset(object, subset, customTesters
|
|
482
|
+
function getObjectSubset(object, subset, customTesters) {
|
|
514
483
|
let stripped = 0;
|
|
515
484
|
const getObjectSubsetWithContext = (seenReferences = /* @__PURE__ */ new WeakMap()) => (object2, subset2) => {
|
|
516
485
|
if (Array.isArray(object2)) {
|
|
@@ -531,6 +500,12 @@ function getObjectSubset(object, subset, customTesters = []) {
|
|
|
531
500
|
}
|
|
532
501
|
const trimmed = {};
|
|
533
502
|
seenReferences.set(object2, trimmed);
|
|
503
|
+
if (typeof object2.constructor === "function" && typeof object2.constructor.name === "string") {
|
|
504
|
+
Object.defineProperty(trimmed, "constructor", {
|
|
505
|
+
enumerable: false,
|
|
506
|
+
value: object2.constructor
|
|
507
|
+
});
|
|
508
|
+
}
|
|
534
509
|
for (const key of getObjectKeys(object2)) {
|
|
535
510
|
if (hasPropertyInObject(subset2, key)) {
|
|
536
511
|
trimmed[key] = seenReferences.has(object2[key]) ? seenReferences.get(object2[key]) : getObjectSubsetWithContext(seenReferences)(
|
|
@@ -558,6 +533,38 @@ function getObjectSubset(object, subset, customTesters = []) {
|
|
|
558
533
|
};
|
|
559
534
|
return { subset: getObjectSubsetWithContext()(object, subset), stripped };
|
|
560
535
|
}
|
|
536
|
+
if (!Object.prototype.hasOwnProperty.call(globalThis, MATCHERS_OBJECT)) {
|
|
537
|
+
const globalState = /* @__PURE__ */ new WeakMap();
|
|
538
|
+
const matchers = /* @__PURE__ */ Object.create(null);
|
|
539
|
+
const customEqualityTesters = [];
|
|
540
|
+
const assymetricMatchers = /* @__PURE__ */ Object.create(null);
|
|
541
|
+
Object.defineProperty(globalThis, MATCHERS_OBJECT, {
|
|
542
|
+
get: () => globalState
|
|
543
|
+
});
|
|
544
|
+
Object.defineProperty(globalThis, JEST_MATCHERS_OBJECT, {
|
|
545
|
+
configurable: true,
|
|
546
|
+
get: () => ({
|
|
547
|
+
state: globalState.get(globalThis[GLOBAL_EXPECT]),
|
|
548
|
+
matchers,
|
|
549
|
+
customEqualityTesters
|
|
550
|
+
})
|
|
551
|
+
});
|
|
552
|
+
Object.defineProperty(globalThis, ASYMMETRIC_MATCHERS_OBJECT, {
|
|
553
|
+
get: () => assymetricMatchers
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
function getState(expect) {
|
|
557
|
+
return globalThis[MATCHERS_OBJECT].get(expect);
|
|
558
|
+
}
|
|
559
|
+
function setState(state, expect) {
|
|
560
|
+
const map = globalThis[MATCHERS_OBJECT];
|
|
561
|
+
const current = map.get(expect) || {};
|
|
562
|
+
const results = Object.defineProperties(current, {
|
|
563
|
+
...Object.getOwnPropertyDescriptors(current),
|
|
564
|
+
...Object.getOwnPropertyDescriptors(state)
|
|
565
|
+
});
|
|
566
|
+
map.set(expect, results);
|
|
567
|
+
}
|
|
561
568
|
class AsymmetricMatcher {
|
|
562
569
|
constructor(sample, inverse = false) {
|
|
563
570
|
// should have "jest" to be compatible with its ecosystem
|
|
@@ -854,9 +861,20 @@ const JestAsymmetricMatchers = (chai, utils) => {
|
|
|
854
861
|
closeTo: (expected, precision) => new CloseTo(expected, precision, true)
|
|
855
862
|
};
|
|
856
863
|
};
|
|
857
|
-
function
|
|
864
|
+
function createAssertionMessage(util, assertion, hasArgs) {
|
|
865
|
+
const not = util.flag(assertion, "negate") ? "not." : "";
|
|
866
|
+
const name = `${util.flag(assertion, "_name")}(${hasArgs ? "expected" : ""})`;
|
|
867
|
+
const promiseName = util.flag(assertion, "promise");
|
|
868
|
+
const promise = promiseName ? `.${promiseName}` : "";
|
|
869
|
+
return `expect(actual)${promise}.${not}${name}`;
|
|
870
|
+
}
|
|
871
|
+
function recordAsyncExpect(_test, promise, assertion, error) {
|
|
872
|
+
const test = _test;
|
|
858
873
|
if (test && promise instanceof Promise) {
|
|
859
874
|
promise = promise.finally(() => {
|
|
875
|
+
if (!test.promises) {
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
860
878
|
const index = test.promises.indexOf(promise);
|
|
861
879
|
if (index !== -1) {
|
|
862
880
|
test.promises.splice(index, 1);
|
|
@@ -866,12 +884,43 @@ function recordAsyncExpect(test, promise) {
|
|
|
866
884
|
test.promises = [];
|
|
867
885
|
}
|
|
868
886
|
test.promises.push(promise);
|
|
887
|
+
let resolved = false;
|
|
888
|
+
test.onFinished ?? (test.onFinished = []);
|
|
889
|
+
test.onFinished.push(() => {
|
|
890
|
+
var _a;
|
|
891
|
+
if (!resolved) {
|
|
892
|
+
const processor = ((_a = globalThis.__vitest_worker__) == null ? void 0 : _a.onFilterStackTrace) || ((s) => s || "");
|
|
893
|
+
const stack = processor(error.stack);
|
|
894
|
+
console.warn([
|
|
895
|
+
`Promise returned by \`${assertion}\` was not awaited. `,
|
|
896
|
+
"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ",
|
|
897
|
+
"Please remember to await the assertion.\n",
|
|
898
|
+
stack
|
|
899
|
+
].join(""));
|
|
900
|
+
}
|
|
901
|
+
});
|
|
902
|
+
return {
|
|
903
|
+
then(onFullfilled, onRejected) {
|
|
904
|
+
resolved = true;
|
|
905
|
+
return promise.then(onFullfilled, onRejected);
|
|
906
|
+
},
|
|
907
|
+
catch(onRejected) {
|
|
908
|
+
return promise.catch(onRejected);
|
|
909
|
+
},
|
|
910
|
+
finally(onFinally) {
|
|
911
|
+
return promise.finally(onFinally);
|
|
912
|
+
},
|
|
913
|
+
[Symbol.toStringTag]: "Promise"
|
|
914
|
+
};
|
|
869
915
|
}
|
|
870
916
|
return promise;
|
|
871
917
|
}
|
|
872
|
-
function
|
|
918
|
+
function wrapAssertion(utils, name, fn) {
|
|
873
919
|
return function(...args) {
|
|
874
920
|
var _a;
|
|
921
|
+
if (name !== "withTest") {
|
|
922
|
+
utils.flag(this, "_name", name);
|
|
923
|
+
}
|
|
875
924
|
if (!utils.flag(this, "soft")) {
|
|
876
925
|
return fn.apply(this, args);
|
|
877
926
|
}
|
|
@@ -894,7 +943,7 @@ const JestChaiExpect = (chai, utils) => {
|
|
|
894
943
|
const customTesters = getCustomEqualityTesters();
|
|
895
944
|
function def(name, fn) {
|
|
896
945
|
const addMethod = (n) => {
|
|
897
|
-
const softWrapper =
|
|
946
|
+
const softWrapper = wrapAssertion(utils, n, fn);
|
|
898
947
|
utils.addMethod(chai.Assertion.prototype, n, softWrapper);
|
|
899
948
|
utils.addMethod(
|
|
900
949
|
globalThis[JEST_MATCHERS_OBJECT].matchers,
|
|
@@ -1020,7 +1069,8 @@ const JestChaiExpect = (chai, utils) => {
|
|
|
1020
1069
|
const isNot = utils.flag(this, "negate");
|
|
1021
1070
|
const { subset: actualSubset, stripped } = getObjectSubset(
|
|
1022
1071
|
actual,
|
|
1023
|
-
expected
|
|
1072
|
+
expected,
|
|
1073
|
+
customTesters
|
|
1024
1074
|
);
|
|
1025
1075
|
if (pass && isNot || !pass && !isNot) {
|
|
1026
1076
|
const msg = utils.getMessage(this, [
|
|
@@ -1115,8 +1165,8 @@ const JestChaiExpect = (chai, utils) => {
|
|
|
1115
1165
|
Boolean(obj),
|
|
1116
1166
|
"expected #{this} to be truthy",
|
|
1117
1167
|
"expected #{this} to not be truthy",
|
|
1118
|
-
|
|
1119
|
-
|
|
1168
|
+
true,
|
|
1169
|
+
obj
|
|
1120
1170
|
);
|
|
1121
1171
|
});
|
|
1122
1172
|
def("toBeFalsy", function() {
|
|
@@ -1125,8 +1175,8 @@ const JestChaiExpect = (chai, utils) => {
|
|
|
1125
1175
|
!obj,
|
|
1126
1176
|
"expected #{this} to be falsy",
|
|
1127
1177
|
"expected #{this} to not be falsy",
|
|
1128
|
-
|
|
1129
|
-
|
|
1178
|
+
false,
|
|
1179
|
+
obj
|
|
1130
1180
|
);
|
|
1131
1181
|
});
|
|
1132
1182
|
def("toBeGreaterThan", function(expected) {
|
|
@@ -1137,8 +1187,8 @@ const JestChaiExpect = (chai, utils) => {
|
|
|
1137
1187
|
actual > expected,
|
|
1138
1188
|
`expected ${actual} to be greater than ${expected}`,
|
|
1139
1189
|
`expected ${actual} to be not greater than ${expected}`,
|
|
1140
|
-
actual,
|
|
1141
1190
|
expected,
|
|
1191
|
+
actual,
|
|
1142
1192
|
false
|
|
1143
1193
|
);
|
|
1144
1194
|
});
|
|
@@ -1150,8 +1200,8 @@ const JestChaiExpect = (chai, utils) => {
|
|
|
1150
1200
|
actual >= expected,
|
|
1151
1201
|
`expected ${actual} to be greater than or equal to ${expected}`,
|
|
1152
1202
|
`expected ${actual} to be not greater than or equal to ${expected}`,
|
|
1153
|
-
actual,
|
|
1154
1203
|
expected,
|
|
1204
|
+
actual,
|
|
1155
1205
|
false
|
|
1156
1206
|
);
|
|
1157
1207
|
});
|
|
@@ -1163,8 +1213,8 @@ const JestChaiExpect = (chai, utils) => {
|
|
|
1163
1213
|
actual < expected,
|
|
1164
1214
|
`expected ${actual} to be less than ${expected}`,
|
|
1165
1215
|
`expected ${actual} to be not less than ${expected}`,
|
|
1166
|
-
actual,
|
|
1167
1216
|
expected,
|
|
1217
|
+
actual,
|
|
1168
1218
|
false
|
|
1169
1219
|
);
|
|
1170
1220
|
});
|
|
@@ -1176,27 +1226,49 @@ const JestChaiExpect = (chai, utils) => {
|
|
|
1176
1226
|
actual <= expected,
|
|
1177
1227
|
`expected ${actual} to be less than or equal to ${expected}`,
|
|
1178
1228
|
`expected ${actual} to be not less than or equal to ${expected}`,
|
|
1179
|
-
actual,
|
|
1180
1229
|
expected,
|
|
1230
|
+
actual,
|
|
1181
1231
|
false
|
|
1182
1232
|
);
|
|
1183
1233
|
});
|
|
1184
1234
|
def("toBeNaN", function() {
|
|
1185
|
-
|
|
1235
|
+
const obj = utils.flag(this, "object");
|
|
1236
|
+
this.assert(
|
|
1237
|
+
Number.isNaN(obj),
|
|
1238
|
+
"expected #{this} to be NaN",
|
|
1239
|
+
"expected #{this} not to be NaN",
|
|
1240
|
+
Number.NaN,
|
|
1241
|
+
obj
|
|
1242
|
+
);
|
|
1186
1243
|
});
|
|
1187
1244
|
def("toBeUndefined", function() {
|
|
1188
|
-
|
|
1245
|
+
const obj = utils.flag(this, "object");
|
|
1246
|
+
this.assert(
|
|
1247
|
+
void 0 === obj,
|
|
1248
|
+
"expected #{this} to be undefined",
|
|
1249
|
+
"expected #{this} not to be undefined",
|
|
1250
|
+
void 0,
|
|
1251
|
+
obj
|
|
1252
|
+
);
|
|
1189
1253
|
});
|
|
1190
1254
|
def("toBeNull", function() {
|
|
1191
|
-
|
|
1255
|
+
const obj = utils.flag(this, "object");
|
|
1256
|
+
this.assert(
|
|
1257
|
+
obj === null,
|
|
1258
|
+
"expected #{this} to be null",
|
|
1259
|
+
"expected #{this} not to be null",
|
|
1260
|
+
null,
|
|
1261
|
+
obj
|
|
1262
|
+
);
|
|
1192
1263
|
});
|
|
1193
1264
|
def("toBeDefined", function() {
|
|
1194
|
-
const
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1265
|
+
const obj = utils.flag(this, "object");
|
|
1266
|
+
this.assert(
|
|
1267
|
+
typeof obj !== "undefined",
|
|
1268
|
+
"expected #{this} to be defined",
|
|
1269
|
+
"expected #{this} to be undefined",
|
|
1270
|
+
obj
|
|
1271
|
+
);
|
|
1200
1272
|
});
|
|
1201
1273
|
def(
|
|
1202
1274
|
"toBeTypeOf",
|
|
@@ -1386,7 +1458,7 @@ const JestChaiExpect = (chai, utils) => {
|
|
|
1386
1458
|
["toThrow", "toThrowError"],
|
|
1387
1459
|
function(expected) {
|
|
1388
1460
|
if (typeof expected === "string" || typeof expected === "undefined" || expected instanceof RegExp) {
|
|
1389
|
-
return this.throws(expected);
|
|
1461
|
+
return this.throws(expected === "" ? /^$/ : expected);
|
|
1390
1462
|
}
|
|
1391
1463
|
const obj = this._obj;
|
|
1392
1464
|
const promise = utils.flag(this, "promise");
|
|
@@ -1645,6 +1717,7 @@ const JestChaiExpect = (chai, utils) => {
|
|
|
1645
1717
|
return result instanceof chai.Assertion ? proxy : result;
|
|
1646
1718
|
}
|
|
1647
1719
|
return (...args) => {
|
|
1720
|
+
utils.flag(this, "_name", key);
|
|
1648
1721
|
const promise = obj.then(
|
|
1649
1722
|
(value) => {
|
|
1650
1723
|
utils.flag(this, "object", value);
|
|
@@ -1665,7 +1738,12 @@ const JestChaiExpect = (chai, utils) => {
|
|
|
1665
1738
|
throw _error;
|
|
1666
1739
|
}
|
|
1667
1740
|
);
|
|
1668
|
-
return recordAsyncExpect(
|
|
1741
|
+
return recordAsyncExpect(
|
|
1742
|
+
test,
|
|
1743
|
+
promise,
|
|
1744
|
+
createAssertionMessage(utils, this, !!args.length),
|
|
1745
|
+
error
|
|
1746
|
+
);
|
|
1669
1747
|
};
|
|
1670
1748
|
}
|
|
1671
1749
|
});
|
|
@@ -1699,6 +1777,7 @@ const JestChaiExpect = (chai, utils) => {
|
|
|
1699
1777
|
return result instanceof chai.Assertion ? proxy : result;
|
|
1700
1778
|
}
|
|
1701
1779
|
return (...args) => {
|
|
1780
|
+
utils.flag(this, "_name", key);
|
|
1702
1781
|
const promise = wrapper.then(
|
|
1703
1782
|
(value) => {
|
|
1704
1783
|
const _error = new AssertionError(
|
|
@@ -1722,7 +1801,12 @@ const JestChaiExpect = (chai, utils) => {
|
|
|
1722
1801
|
return result.call(this, ...args);
|
|
1723
1802
|
}
|
|
1724
1803
|
);
|
|
1725
|
-
return recordAsyncExpect(
|
|
1804
|
+
return recordAsyncExpect(
|
|
1805
|
+
test,
|
|
1806
|
+
promise,
|
|
1807
|
+
createAssertionMessage(utils, this, !!args.length),
|
|
1808
|
+
error
|
|
1809
|
+
);
|
|
1726
1810
|
};
|
|
1727
1811
|
}
|
|
1728
1812
|
});
|
|
@@ -1863,7 +1947,7 @@ function JestExtendPlugin(c, expect, matchers) {
|
|
|
1863
1947
|
throw new JestExtendError(message(), actual, expected);
|
|
1864
1948
|
}
|
|
1865
1949
|
}
|
|
1866
|
-
const softWrapper =
|
|
1950
|
+
const softWrapper = wrapAssertion(utils, expectAssertionName, expectWrapper);
|
|
1867
1951
|
utils.addMethod(
|
|
1868
1952
|
globalThis[JEST_MATCHERS_OBJECT].matchers,
|
|
1869
1953
|
expectAssertionName,
|
|
@@ -755,12 +755,18 @@ function requireReactIs_development() {
|
|
|
755
755
|
}
|
|
756
756
|
return reactIs_development;
|
|
757
757
|
}
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
758
|
+
var hasRequiredReactIs;
|
|
759
|
+
function requireReactIs() {
|
|
760
|
+
if (hasRequiredReactIs) return reactIs.exports;
|
|
761
|
+
hasRequiredReactIs = 1;
|
|
762
|
+
if (process.env.NODE_ENV === "production") {
|
|
763
|
+
reactIs.exports = requireReactIs_production_min();
|
|
764
|
+
} else {
|
|
765
|
+
reactIs.exports = requireReactIs_development();
|
|
766
|
+
}
|
|
767
|
+
return reactIs.exports;
|
|
762
768
|
}
|
|
763
|
-
var reactIsExports =
|
|
769
|
+
var reactIsExports = requireReactIs();
|
|
764
770
|
function getChildren(arg, children = []) {
|
|
765
771
|
if (Array.isArray(arg)) {
|
|
766
772
|
for (const item of arg) {
|
|
@@ -753,12 +753,18 @@ function requireReactIs_development() {
|
|
|
753
753
|
}
|
|
754
754
|
return reactIs_development;
|
|
755
755
|
}
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
756
|
+
var hasRequiredReactIs;
|
|
757
|
+
function requireReactIs() {
|
|
758
|
+
if (hasRequiredReactIs) return reactIs.exports;
|
|
759
|
+
hasRequiredReactIs = 1;
|
|
760
|
+
if (process.env.NODE_ENV === "production") {
|
|
761
|
+
reactIs.exports = requireReactIs_production_min();
|
|
762
|
+
} else {
|
|
763
|
+
reactIs.exports = requireReactIs_development();
|
|
764
|
+
}
|
|
765
|
+
return reactIs.exports;
|
|
760
766
|
}
|
|
761
|
-
var reactIsExports =
|
|
767
|
+
var reactIsExports = requireReactIs();
|
|
762
768
|
function getChildren(arg, children = []) {
|
|
763
769
|
if (Array.isArray(arg)) {
|
|
764
770
|
for (const item of arg) {
|
|
@@ -3,28 +3,10 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6
|
-
const index = require("../../../../../@vitest_utils@2.1.
|
|
6
|
+
const index = require("../../../../../@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/index.qwik.cjs");
|
|
7
7
|
const chunkTasks = require("./chunk-tasks.qwik.cjs");
|
|
8
|
-
const helpers = require("../../../../../@vitest_utils@2.1.
|
|
9
|
-
const
|
|
10
|
-
const fnMap = /* @__PURE__ */ new WeakMap();
|
|
11
|
-
const fixtureMap = /* @__PURE__ */ new WeakMap();
|
|
12
|
-
const hooksMap = /* @__PURE__ */ new WeakMap();
|
|
13
|
-
function setFn(key, fn) {
|
|
14
|
-
fnMap.set(key, fn);
|
|
15
|
-
}
|
|
16
|
-
function setFixture(key, fixture) {
|
|
17
|
-
fixtureMap.set(key, fixture);
|
|
18
|
-
}
|
|
19
|
-
function getFixture(key) {
|
|
20
|
-
return fixtureMap.get(key);
|
|
21
|
-
}
|
|
22
|
-
function setHooks(key, hooks) {
|
|
23
|
-
hooksMap.set(key, hooks);
|
|
24
|
-
}
|
|
25
|
-
function getHooks(key) {
|
|
26
|
-
return hooksMap.get(key);
|
|
27
|
-
}
|
|
8
|
+
const helpers = require("../../../../../@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/helpers.qwik.cjs");
|
|
9
|
+
const chunk_commonjsHelpers = require("../../../../../@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.cjs");
|
|
28
10
|
class PendingError extends Error {
|
|
29
11
|
constructor(message, task) {
|
|
30
12
|
super(message);
|
|
@@ -91,6 +73,24 @@ function makeTimeoutMsg(isHook, timeout) {
|
|
|
91
73
|
return `${isHook ? "Hook" : "Test"} timed out in ${timeout}ms.
|
|
92
74
|
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"}".`;
|
|
93
75
|
}
|
|
76
|
+
const fnMap = /* @__PURE__ */ new WeakMap();
|
|
77
|
+
const fixtureMap = /* @__PURE__ */ new WeakMap();
|
|
78
|
+
const hooksMap = /* @__PURE__ */ new WeakMap();
|
|
79
|
+
function setFn(key, fn) {
|
|
80
|
+
fnMap.set(key, fn);
|
|
81
|
+
}
|
|
82
|
+
function setFixture(key, fixture) {
|
|
83
|
+
fixtureMap.set(key, fixture);
|
|
84
|
+
}
|
|
85
|
+
function getFixture(key) {
|
|
86
|
+
return fixtureMap.get(key);
|
|
87
|
+
}
|
|
88
|
+
function setHooks(key, hooks) {
|
|
89
|
+
hooksMap.set(key, hooks);
|
|
90
|
+
}
|
|
91
|
+
function getHooks(key) {
|
|
92
|
+
return hooksMap.get(key);
|
|
93
|
+
}
|
|
94
94
|
function mergeContextFixtures(fixtures, context = {}) {
|
|
95
95
|
const fixtureOptionKeys = ["auto"];
|
|
96
96
|
const fixtureArray = Object.entries(fixtures).map(
|
|
@@ -213,7 +213,11 @@ function resolveDeps(fixtures, depSet = /* @__PURE__ */ new Set(), pendingFixtur
|
|
|
213
213
|
return pendingFixtures;
|
|
214
214
|
}
|
|
215
215
|
function getUsedProps(fn) {
|
|
216
|
-
|
|
216
|
+
let fnString = fn.toString();
|
|
217
|
+
if (/__async\(this, (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(fnString)) {
|
|
218
|
+
fnString = fnString.split("__async(this,")[1];
|
|
219
|
+
}
|
|
220
|
+
const match = fnString.match(/[^(]*\(([^)]*)/);
|
|
217
221
|
if (!match) {
|
|
218
222
|
return [];
|
|
219
223
|
}
|
|
@@ -470,11 +474,13 @@ function createSuite() {
|
|
|
470
474
|
factoryOrOptions,
|
|
471
475
|
optionsOrFactory
|
|
472
476
|
);
|
|
477
|
+
const isConcurrentSpecified = options.concurrent || this.concurrent || options.sequential === false;
|
|
478
|
+
const isSequentialSpecified = options.sequential || this.sequential || options.concurrent === false;
|
|
473
479
|
if (currentSuite == null ? void 0 : currentSuite.options) {
|
|
474
480
|
options = { ...currentSuite.options, ...options };
|
|
475
481
|
}
|
|
476
|
-
const isConcurrent =
|
|
477
|
-
const isSequential =
|
|
482
|
+
const isConcurrent = isConcurrentSpecified || options.concurrent && !isSequentialSpecified;
|
|
483
|
+
const isSequential = isSequentialSpecified || options.sequential && !isConcurrentSpecified;
|
|
478
484
|
options.concurrent = isConcurrent && !isSequential;
|
|
479
485
|
options.sequential = isSequential && !isConcurrent;
|
|
480
486
|
return createSuiteCollector(
|
|
@@ -522,7 +528,7 @@ function createSuite() {
|
|
|
522
528
|
};
|
|
523
529
|
suiteFn.skipIf = (condition) => condition ? suite.skip : suite;
|
|
524
530
|
suiteFn.runIf = (condition) => condition ? suite : suite.skip;
|
|
525
|
-
return chunkTasks.
|
|
531
|
+
return chunkTasks.c(
|
|
526
532
|
["concurrent", "sequential", "shuffle", "skip", "only", "todo"],
|
|
527
533
|
suiteFn
|
|
528
534
|
);
|
|
@@ -596,7 +602,7 @@ function createTaskCollector(fn, context) {
|
|
|
596
602
|
);
|
|
597
603
|
}, _context);
|
|
598
604
|
};
|
|
599
|
-
const _test = chunkTasks.
|
|
605
|
+
const _test = chunkTasks.c(
|
|
600
606
|
["concurrent", "sequential", "skip", "only", "todo", "fails"],
|
|
601
607
|
taskFn
|
|
602
608
|
);
|
|
@@ -628,14 +634,14 @@ function formatTitle(template, items, idx) {
|
|
|
628
634
|
}
|
|
629
635
|
});
|
|
630
636
|
}
|
|
631
|
-
let formatted =
|
|
637
|
+
let formatted = chunk_commonjsHelpers.f(template, ...items.slice(0, count));
|
|
632
638
|
if (helpers.isObject(items[0])) {
|
|
633
639
|
formatted = formatted.replace(
|
|
634
640
|
/\$([$\w.]+)/g,
|
|
635
641
|
// https://github.com/chaijs/chai/pull/1490
|
|
636
642
|
(_, key) => {
|
|
637
643
|
var _a, _b;
|
|
638
|
-
return
|
|
644
|
+
return chunk_commonjsHelpers.o(helpers.objectAttr(items[0], key), {
|
|
639
645
|
truncate: (_b = (_a = void 0) == null ? void 0 : _a.chaiConfig) == null ? void 0 : _b.truncateThreshold
|
|
640
646
|
});
|
|
641
647
|
}
|
|
@@ -1,28 +1,10 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { getSafeTimers } from "../../../../../@vitest_utils@2.1.
|
|
5
|
-
import {
|
|
6
|
-
import { isNegativeNaN, isObject, objectAttr, toArray, createDefer } from "../../../../../@vitest_utils@2.1.
|
|
7
|
-
import { f as format, o as objDisplay } from "../../../../../@vitest_utils@2.1.
|
|
8
|
-
const fnMap = /* @__PURE__ */ new WeakMap();
|
|
9
|
-
const fixtureMap = /* @__PURE__ */ new WeakMap();
|
|
10
|
-
const hooksMap = /* @__PURE__ */ new WeakMap();
|
|
11
|
-
function setFn(key, fn) {
|
|
12
|
-
fnMap.set(key, fn);
|
|
13
|
-
}
|
|
14
|
-
function setFixture(key, fixture) {
|
|
15
|
-
fixtureMap.set(key, fixture);
|
|
16
|
-
}
|
|
17
|
-
function getFixture(key) {
|
|
18
|
-
return fixtureMap.get(key);
|
|
19
|
-
}
|
|
20
|
-
function setHooks(key, hooks) {
|
|
21
|
-
hooksMap.set(key, hooks);
|
|
22
|
-
}
|
|
23
|
-
function getHooks(key) {
|
|
24
|
-
return hooksMap.get(key);
|
|
25
|
-
}
|
|
4
|
+
import { getSafeTimers } from "../../../../../@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/index.qwik.mjs";
|
|
5
|
+
import { c as createChainable } from "./chunk-tasks.qwik.mjs";
|
|
6
|
+
import { isNegativeNaN, isObject, objectAttr, toArray, createDefer } from "../../../../../@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/helpers.qwik.mjs";
|
|
7
|
+
import { f as format, o as objDisplay } from "../../../../../@vitest_utils@2.1.8/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.mjs";
|
|
26
8
|
class PendingError extends Error {
|
|
27
9
|
constructor(message, task) {
|
|
28
10
|
super(message);
|
|
@@ -89,6 +71,24 @@ function makeTimeoutMsg(isHook, timeout) {
|
|
|
89
71
|
return `${isHook ? "Hook" : "Test"} timed out in ${timeout}ms.
|
|
90
72
|
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"}".`;
|
|
91
73
|
}
|
|
74
|
+
const fnMap = /* @__PURE__ */ new WeakMap();
|
|
75
|
+
const fixtureMap = /* @__PURE__ */ new WeakMap();
|
|
76
|
+
const hooksMap = /* @__PURE__ */ new WeakMap();
|
|
77
|
+
function setFn(key, fn) {
|
|
78
|
+
fnMap.set(key, fn);
|
|
79
|
+
}
|
|
80
|
+
function setFixture(key, fixture) {
|
|
81
|
+
fixtureMap.set(key, fixture);
|
|
82
|
+
}
|
|
83
|
+
function getFixture(key) {
|
|
84
|
+
return fixtureMap.get(key);
|
|
85
|
+
}
|
|
86
|
+
function setHooks(key, hooks) {
|
|
87
|
+
hooksMap.set(key, hooks);
|
|
88
|
+
}
|
|
89
|
+
function getHooks(key) {
|
|
90
|
+
return hooksMap.get(key);
|
|
91
|
+
}
|
|
92
92
|
function mergeContextFixtures(fixtures, context = {}) {
|
|
93
93
|
const fixtureOptionKeys = ["auto"];
|
|
94
94
|
const fixtureArray = Object.entries(fixtures).map(
|
|
@@ -211,7 +211,11 @@ function resolveDeps(fixtures, depSet = /* @__PURE__ */ new Set(), pendingFixtur
|
|
|
211
211
|
return pendingFixtures;
|
|
212
212
|
}
|
|
213
213
|
function getUsedProps(fn) {
|
|
214
|
-
|
|
214
|
+
let fnString = fn.toString();
|
|
215
|
+
if (/__async\(this, (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(fnString)) {
|
|
216
|
+
fnString = fnString.split("__async(this,")[1];
|
|
217
|
+
}
|
|
218
|
+
const match = fnString.match(/[^(]*\(([^)]*)/);
|
|
215
219
|
if (!match) {
|
|
216
220
|
return [];
|
|
217
221
|
}
|
|
@@ -468,11 +472,13 @@ function createSuite() {
|
|
|
468
472
|
factoryOrOptions,
|
|
469
473
|
optionsOrFactory
|
|
470
474
|
);
|
|
475
|
+
const isConcurrentSpecified = options.concurrent || this.concurrent || options.sequential === false;
|
|
476
|
+
const isSequentialSpecified = options.sequential || this.sequential || options.concurrent === false;
|
|
471
477
|
if (currentSuite == null ? void 0 : currentSuite.options) {
|
|
472
478
|
options = { ...currentSuite.options, ...options };
|
|
473
479
|
}
|
|
474
|
-
const isConcurrent =
|
|
475
|
-
const isSequential =
|
|
480
|
+
const isConcurrent = isConcurrentSpecified || options.concurrent && !isSequentialSpecified;
|
|
481
|
+
const isSequential = isSequentialSpecified || options.sequential && !isConcurrentSpecified;
|
|
476
482
|
options.concurrent = isConcurrent && !isSequential;
|
|
477
483
|
options.sequential = isSequential && !isConcurrent;
|
|
478
484
|
return createSuiteCollector(
|