@noma.to/qwik-testing-library 1.2.0 → 1.3.1
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/qwik-testing-library.qwik.cjs +2 -2
- package/lib/lib/qwik-testing-library.qwik.mjs +3 -3
- 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@3.0.5}/node_modules/@vitest/expect/dist/index.qwik.cjs +321 -97
- package/lib/node_modules/.pnpm/{@vitest_expect@2.1.1 → @vitest_expect@3.0.5}/node_modules/@vitest/expect/dist/index.qwik.mjs +318 -94
- package/lib/node_modules/.pnpm/{@vitest_pretty-format@2.1.1 → @vitest_pretty-format@3.0.5}/node_modules/@vitest/pretty-format/dist/index.qwik.cjs +312 -15
- package/lib/node_modules/.pnpm/{@vitest_pretty-format@2.1.1 → @vitest_pretty-format@3.0.5}/node_modules/@vitest/pretty-format/dist/index.qwik.mjs +317 -20
- package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@3.0.5}/node_modules/@vitest/runner/dist/chunk-tasks.qwik.cjs +2 -2
- package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@3.0.5}/node_modules/@vitest/runner/dist/chunk-tasks.qwik.mjs +2 -2
- package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@3.0.5}/node_modules/@vitest/runner/dist/index.qwik.cjs +161 -69
- package/lib/node_modules/.pnpm/{@vitest_runner@2.1.1 → @vitest_runner@3.0.5}/node_modules/@vitest/runner/dist/index.qwik.mjs +158 -66
- package/lib/node_modules/.pnpm/{@vitest_snapshot@2.1.1 → @vitest_snapshot@3.0.5}/node_modules/@vitest/snapshot/dist/index.qwik.cjs +976 -538
- package/lib/node_modules/.pnpm/{@vitest_snapshot@2.1.1 → @vitest_snapshot@3.0.5}/node_modules/@vitest/snapshot/dist/index.qwik.mjs +976 -538
- package/lib/node_modules/.pnpm/{@vitest_spy@2.1.1 → @vitest_spy@3.0.5}/node_modules/@vitest/spy/dist/index.qwik.cjs +20 -3
- package/lib/node_modules/.pnpm/{@vitest_spy@2.1.1 → @vitest_spy@3.0.5}/node_modules/@vitest/spy/dist/index.qwik.mjs +20 -3
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/chunk-display.qwik.cjs → @vitest_utils@3.0.5/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.cjs} +7 -3
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1/node_modules/@vitest/utils/dist/chunk-display.qwik.mjs → @vitest_utils@3.0.5/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.qwik.mjs} +7 -3
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/diff.qwik.cjs +491 -467
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/diff.qwik.mjs +491 -467
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/error.qwik.cjs +6 -6
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/error.qwik.mjs +3 -3
- package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/index.qwik.cjs +474 -0
- package/lib/node_modules/.pnpm/@vitest_utils@3.0.5/node_modules/@vitest/utils/dist/index.qwik.mjs +474 -0
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/source-map.qwik.cjs +20 -20
- package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/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.3}/node_modules/loupe/lib/error.qwik.cjs +7 -1
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/error.qwik.mjs +7 -1
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/index.qwik.mjs +6 -6
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/map.qwik.cjs +1 -3
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/map.qwik.mjs +1 -3
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/object.qwik.cjs +1 -1
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/object.qwik.mjs +1 -1
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/string.qwik.cjs +1 -2
- package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/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/{pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.qwik.cjs → pathe@2.0.2/node_modules/pathe/dist/shared/pathe.UZ-hd4nF.qwik.cjs} +2 -2
- package/lib/node_modules/.pnpm/{pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.qwik.mjs → pathe@2.0.2/node_modules/pathe/dist/shared/pathe.UZ-hd4nF.qwik.mjs} +2 -2
- package/lib/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.qwik.cjs +4 -0
- package/lib/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/browser.qwik.mjs +5 -0
- package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.qwik.cjs +66 -0
- package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.qwik.mjs +66 -0
- package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.CjhMlMwf.qwik.cjs +2977 -0
- package/lib/node_modules/.pnpm/vitest@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0/node_modules/vitest/dist/chunks/vi.CjhMlMwf.qwik.mjs +2977 -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/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/browser.qwik.cjs +0 -7
- package/lib/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/browser.qwik.mjs +0 -8
- 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_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/helpers.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{@vitest_utils@2.1.1 → @vitest_utils@3.0.5}/node_modules/@vitest/utils/dist/helpers.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/arguments.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/arguments.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/array.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/array.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/bigint.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/bigint.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/class.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/class.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/date.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/date.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/function.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/function.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/helpers.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/helpers.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/html.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/html.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/index.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/number.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/number.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/promise.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/promise.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/regexp.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/regexp.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/set.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/set.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/symbol.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/symbol.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/typedarray.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{loupe@3.1.1 → loupe@3.1.3}/node_modules/loupe/lib/typedarray.qwik.mjs +0 -0
- /package/lib/node_modules/.pnpm/{tinyrainbow@1.2.0 → tinyrainbow@2.0.0}/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.qwik.cjs +0 -0
- /package/lib/node_modules/.pnpm/{tinyrainbow@1.2.0 → tinyrainbow@2.0.0}/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.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@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_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@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_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@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_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@3.0.5_@types_node@22.13.1_@vitest_ui@3.0.5_jiti@2.4.2_jsdom@26.0.0}/node_modules/vitest/dist/chunks/date.W2xKR2qe.qwik.mjs +0 -0
|
@@ -1,16 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const index = require("../../../../../tinyspy@3.0.2/node_modules/tinyspy/dist/index.qwik.cjs");
|
|
4
|
+
const vitestSpy = Symbol.for("vitest.spy");
|
|
4
5
|
const mocks = /* @__PURE__ */ new Set();
|
|
5
6
|
function isMockFunction(fn2) {
|
|
6
7
|
return typeof fn2 === "function" && "_isMockFunction" in fn2 && fn2._isMockFunction;
|
|
7
8
|
}
|
|
9
|
+
function getSpy(obj, method, accessType) {
|
|
10
|
+
const desc = Object.getOwnPropertyDescriptor(obj, method);
|
|
11
|
+
if (desc) {
|
|
12
|
+
const fn2 = desc[accessType ?? "value"];
|
|
13
|
+
if (typeof fn2 === "function" && vitestSpy in fn2) {
|
|
14
|
+
return fn2;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
8
18
|
function spyOn(obj, method, accessType) {
|
|
9
19
|
const dictionary = {
|
|
10
20
|
get: "getter",
|
|
11
21
|
set: "setter"
|
|
12
22
|
};
|
|
13
23
|
const objMethod = accessType ? { [dictionary[accessType]]: method } : method;
|
|
24
|
+
const currentStub = getSpy(obj, method, accessType);
|
|
25
|
+
if (currentStub) {
|
|
26
|
+
return currentStub;
|
|
27
|
+
}
|
|
14
28
|
const stub = index.internalSpyOn(obj, objMethod);
|
|
15
29
|
return enhanceSpy(stub);
|
|
16
30
|
}
|
|
@@ -62,6 +76,10 @@ function enhanceSpy(spy) {
|
|
|
62
76
|
return impl.apply(this, args);
|
|
63
77
|
}
|
|
64
78
|
let name = stub.name;
|
|
79
|
+
Object.defineProperty(stub, vitestSpy, {
|
|
80
|
+
value: true,
|
|
81
|
+
enumerable: false
|
|
82
|
+
});
|
|
65
83
|
stub.getMockName = () => name || "vi.fn()";
|
|
66
84
|
stub.mockName = (n) => {
|
|
67
85
|
name = n;
|
|
@@ -76,17 +94,16 @@ function enhanceSpy(spy) {
|
|
|
76
94
|
};
|
|
77
95
|
stub.mockReset = () => {
|
|
78
96
|
stub.mockClear();
|
|
79
|
-
implementation =
|
|
97
|
+
implementation = void 0;
|
|
80
98
|
onceImplementations = [];
|
|
81
99
|
return stub;
|
|
82
100
|
};
|
|
83
101
|
stub.mockRestore = () => {
|
|
84
102
|
stub.mockReset();
|
|
85
103
|
state.restore();
|
|
86
|
-
implementation = void 0;
|
|
87
104
|
return stub;
|
|
88
105
|
};
|
|
89
|
-
stub.getMockImplementation = () => implementation;
|
|
106
|
+
stub.getMockImplementation = () => implementationChangedTemporarily ? implementation : onceImplementations.at(0) || implementation;
|
|
90
107
|
stub.mockImplementation = (fn2) => {
|
|
91
108
|
implementation = fn2;
|
|
92
109
|
state.willCall(mockCall);
|
|
@@ -1,14 +1,28 @@
|
|
|
1
1
|
import { internalSpyOn as C, getInternalState as T } from "../../../../../tinyspy@3.0.2/node_modules/tinyspy/dist/index.qwik.mjs";
|
|
2
|
+
const vitestSpy = Symbol.for("vitest.spy");
|
|
2
3
|
const mocks = /* @__PURE__ */ new Set();
|
|
3
4
|
function isMockFunction(fn2) {
|
|
4
5
|
return typeof fn2 === "function" && "_isMockFunction" in fn2 && fn2._isMockFunction;
|
|
5
6
|
}
|
|
7
|
+
function getSpy(obj, method, accessType) {
|
|
8
|
+
const desc = Object.getOwnPropertyDescriptor(obj, method);
|
|
9
|
+
if (desc) {
|
|
10
|
+
const fn2 = desc[accessType ?? "value"];
|
|
11
|
+
if (typeof fn2 === "function" && vitestSpy in fn2) {
|
|
12
|
+
return fn2;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
6
16
|
function spyOn(obj, method, accessType) {
|
|
7
17
|
const dictionary = {
|
|
8
18
|
get: "getter",
|
|
9
19
|
set: "setter"
|
|
10
20
|
};
|
|
11
21
|
const objMethod = accessType ? { [dictionary[accessType]]: method } : method;
|
|
22
|
+
const currentStub = getSpy(obj, method, accessType);
|
|
23
|
+
if (currentStub) {
|
|
24
|
+
return currentStub;
|
|
25
|
+
}
|
|
12
26
|
const stub = C(obj, objMethod);
|
|
13
27
|
return enhanceSpy(stub);
|
|
14
28
|
}
|
|
@@ -60,6 +74,10 @@ function enhanceSpy(spy) {
|
|
|
60
74
|
return impl.apply(this, args);
|
|
61
75
|
}
|
|
62
76
|
let name = stub.name;
|
|
77
|
+
Object.defineProperty(stub, vitestSpy, {
|
|
78
|
+
value: true,
|
|
79
|
+
enumerable: false
|
|
80
|
+
});
|
|
63
81
|
stub.getMockName = () => name || "vi.fn()";
|
|
64
82
|
stub.mockName = (n) => {
|
|
65
83
|
name = n;
|
|
@@ -74,17 +92,16 @@ function enhanceSpy(spy) {
|
|
|
74
92
|
};
|
|
75
93
|
stub.mockReset = () => {
|
|
76
94
|
stub.mockClear();
|
|
77
|
-
implementation =
|
|
95
|
+
implementation = void 0;
|
|
78
96
|
onceImplementations = [];
|
|
79
97
|
return stub;
|
|
80
98
|
};
|
|
81
99
|
stub.mockRestore = () => {
|
|
82
100
|
stub.mockReset();
|
|
83
101
|
state.restore();
|
|
84
|
-
implementation = void 0;
|
|
85
102
|
return stub;
|
|
86
103
|
};
|
|
87
|
-
stub.getMockImplementation = () => implementation;
|
|
104
|
+
stub.getMockImplementation = () => implementationChangedTemporarily ? implementation : onceImplementations.at(0) || implementation;
|
|
88
105
|
stub.mockImplementation = (fn2) => {
|
|
89
106
|
implementation = fn2;
|
|
90
107
|
state.willCall(mockCall);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("
|
|
4
|
-
const index
|
|
3
|
+
const index$1 = require("../../../../../@vitest_pretty-format@3.0.5/node_modules/@vitest/pretty-format/dist/index.qwik.cjs");
|
|
4
|
+
const index = require("../../../../../loupe@3.1.3/node_modules/loupe/lib/index.qwik.cjs");
|
|
5
5
|
const {
|
|
6
6
|
AsymmetricMatcher,
|
|
7
7
|
DOMCollection,
|
|
@@ -39,7 +39,7 @@ function stringify(object, maxDepth = 10, { maxLength, ...options } = {}) {
|
|
|
39
39
|
...options
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
return result.length >= MAX_LENGTH && maxDepth > 1 ? stringify(object, Math.floor(maxDepth / 2)) : result;
|
|
42
|
+
return result.length >= MAX_LENGTH && maxDepth > 1 ? stringify(object, Math.floor(Math.min(maxDepth, Number.MAX_SAFE_INTEGER) / 2), { maxLength, ...options }) : result;
|
|
43
43
|
}
|
|
44
44
|
const formatRegExp = /%[sdjifoOc%]/g;
|
|
45
45
|
function format(...args) {
|
|
@@ -152,7 +152,11 @@ function objDisplay(obj, options = {}) {
|
|
|
152
152
|
}
|
|
153
153
|
return str;
|
|
154
154
|
}
|
|
155
|
+
function getDefaultExportFromCjs(x) {
|
|
156
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
157
|
+
}
|
|
155
158
|
exports.f = format;
|
|
159
|
+
exports.g = getDefaultExportFromCjs;
|
|
156
160
|
exports.i = inspect;
|
|
157
161
|
exports.o = objDisplay;
|
|
158
162
|
exports.s = stringify;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { format as format$1, plugins } from "../../../../../@vitest_pretty-format@3.0.5/node_modules/@vitest/pretty-format/dist/index.qwik.mjs";
|
|
2
|
+
import { inspect as inspect$1 } from "../../../../../loupe@3.1.3/node_modules/loupe/lib/index.qwik.mjs";
|
|
3
3
|
const {
|
|
4
4
|
AsymmetricMatcher,
|
|
5
5
|
DOMCollection,
|
|
@@ -37,7 +37,7 @@ function stringify(object, maxDepth = 10, { maxLength, ...options } = {}) {
|
|
|
37
37
|
...options
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
return result.length >= MAX_LENGTH && maxDepth > 1 ? stringify(object, Math.floor(maxDepth / 2)) : result;
|
|
40
|
+
return result.length >= MAX_LENGTH && maxDepth > 1 ? stringify(object, Math.floor(Math.min(maxDepth, Number.MAX_SAFE_INTEGER) / 2), { maxLength, ...options }) : result;
|
|
41
41
|
}
|
|
42
42
|
const formatRegExp = /%[sdjifoOc%]/g;
|
|
43
43
|
function format(...args) {
|
|
@@ -150,8 +150,12 @@ function objDisplay(obj, options = {}) {
|
|
|
150
150
|
}
|
|
151
151
|
return str;
|
|
152
152
|
}
|
|
153
|
+
function getDefaultExportFromCjs(x) {
|
|
154
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
155
|
+
}
|
|
153
156
|
export {
|
|
154
157
|
format as f,
|
|
158
|
+
getDefaultExportFromCjs as g,
|
|
155
159
|
inspect as i,
|
|
156
160
|
objDisplay as o,
|
|
157
161
|
stringify as s
|