@noma.to/qwik-mock 1.0.2 → 1.1.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/lib/lib/qwik-mock.cjs +24 -6
- package/lib/lib/qwik-mock.mjs +24 -6
- package/lib-types/index.d.ts +2 -1
- package/lib-types/lib/qwik-mock.d.ts +21 -19
- package/package.json +7 -6
- package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.cjs +0 -83
- package/lib/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +0 -83
- package/lib/node_modules/.pnpm/@vitest_expect@4.0.18/node_modules/@vitest/expect/dist/index.cjs +0 -1785
- package/lib/node_modules/.pnpm/@vitest_expect@4.0.18/node_modules/@vitest/expect/dist/index.mjs +0 -1785
- package/lib/node_modules/.pnpm/@vitest_pretty-format@4.0.18/node_modules/@vitest/pretty-format/dist/index.cjs +0 -964
- package/lib/node_modules/.pnpm/@vitest_pretty-format@4.0.18/node_modules/@vitest/pretty-format/dist/index.mjs +0 -964
- package/lib/node_modules/.pnpm/@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/chunk-tasks.cjs +0 -60
- package/lib/node_modules/.pnpm/@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/chunk-tasks.mjs +0 -60
- package/lib/node_modules/.pnpm/@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/index.cjs +0 -1102
- package/lib/node_modules/.pnpm/@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/index.mjs +0 -1102
- package/lib/node_modules/.pnpm/@vitest_snapshot@4.0.18/node_modules/@vitest/snapshot/dist/index.cjs +0 -1289
- package/lib/node_modules/.pnpm/@vitest_snapshot@4.0.18/node_modules/@vitest/snapshot/dist/index.mjs +0 -1289
- package/lib/node_modules/.pnpm/@vitest_spy@4.0.18/node_modules/@vitest/spy/dist/index.cjs +0 -422
- package/lib/node_modules/.pnpm/@vitest_spy@4.0.18/node_modules/@vitest/spy/dist/index.mjs +0 -422
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.cjs +0 -6
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.mjs +0 -6
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.cjs +0 -98
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.mjs +0 -98
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/diff.cjs +0 -1626
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/diff.mjs +0 -1626
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/display.cjs +0 -690
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/display.mjs +0 -690
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/error.cjs +0 -39
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/error.mjs +0 -39
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/helpers.cjs +0 -151
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/helpers.mjs +0 -151
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/serialize.cjs +0 -114
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/serialize.mjs +0 -114
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/source-map.cjs +0 -125
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/source-map.mjs +0 -125
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/timers.cjs +0 -22
- package/lib/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/timers.mjs +0 -22
- package/lib/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.cjs +0 -4056
- package/lib/node_modules/.pnpm/chai@6.2.2/node_modules/chai/index.mjs +0 -4056
- package/lib/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.cjs +0 -994
- package/lib/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.mjs +0 -994
- package/lib/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs +0 -101
- package/lib/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +0 -101
- package/lib/node_modules/.pnpm/tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.cjs +0 -84
- package/lib/node_modules/.pnpm/tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.mjs +0 -84
- package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.cjs +0 -4
- package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.mjs +0 -4
- package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.cjs +0 -51
- package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.mjs +0 -51
- package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/utils.DvEY5TfP.cjs +0 -45
- package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/utils.DvEY5TfP.mjs +0 -45
- package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/vi.2VT5v0um.cjs +0 -2609
- package/lib/node_modules/.pnpm/vitest@4.0.18_@types_node@25.1.0_@vitest_ui@4.0.18_happy-dom@20.0.11_jiti@2.4.2_jsdom@26.1.0__pd2l5poczrcnqygjcqiguyknnm/node_modules/vitest/dist/chunks/vi.2VT5v0um.mjs +0 -2609
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const sourceMap = require("../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/source-map.cjs");
|
|
4
|
-
function createChainable(keys, fn) {
|
|
5
|
-
function create(context) {
|
|
6
|
-
const chain2 = function(...args) {
|
|
7
|
-
return fn.apply(context, args);
|
|
8
|
-
};
|
|
9
|
-
Object.assign(chain2, fn);
|
|
10
|
-
chain2.withContext = () => chain2.bind(context);
|
|
11
|
-
chain2.setContext = (key, value) => {
|
|
12
|
-
context[key] = value;
|
|
13
|
-
};
|
|
14
|
-
chain2.mergeContext = (ctx) => {
|
|
15
|
-
Object.assign(context, ctx);
|
|
16
|
-
};
|
|
17
|
-
for (const key of keys) {
|
|
18
|
-
Object.defineProperty(chain2, key, { get() {
|
|
19
|
-
return create({
|
|
20
|
-
...context,
|
|
21
|
-
[key]: true
|
|
22
|
-
});
|
|
23
|
-
} });
|
|
24
|
-
}
|
|
25
|
-
return chain2;
|
|
26
|
-
}
|
|
27
|
-
const chain = create({});
|
|
28
|
-
chain.fn = fn;
|
|
29
|
-
return chain;
|
|
30
|
-
}
|
|
31
|
-
function findTestFileStackTrace(testFilePath, error) {
|
|
32
|
-
const lines = error.split("\n").slice(1);
|
|
33
|
-
for (const line of lines) {
|
|
34
|
-
const stack = sourceMap.parseSingleStack(line);
|
|
35
|
-
if (stack && stack.file === testFilePath) {
|
|
36
|
-
return stack;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
function getNames(task) {
|
|
41
|
-
const names = [task.name];
|
|
42
|
-
let current = task;
|
|
43
|
-
while (current === null || current === void 0 ? void 0 : current.suite) {
|
|
44
|
-
current = current.suite;
|
|
45
|
-
if (current === null || current === void 0 ? void 0 : current.name) {
|
|
46
|
-
names.unshift(current.name);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (current !== task.file) {
|
|
50
|
-
names.unshift(task.file.name);
|
|
51
|
-
}
|
|
52
|
-
return names;
|
|
53
|
-
}
|
|
54
|
-
function createTaskName(names, separator = " > ") {
|
|
55
|
-
return names.filter((name) => name !== void 0).join(separator);
|
|
56
|
-
}
|
|
57
|
-
exports.c = createChainable;
|
|
58
|
-
exports.e = createTaskName;
|
|
59
|
-
exports.f = findTestFileStackTrace;
|
|
60
|
-
exports.j = getNames;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { parseSingleStack } from "../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/source-map.mjs";
|
|
2
|
-
function createChainable(keys, fn) {
|
|
3
|
-
function create(context) {
|
|
4
|
-
const chain2 = function(...args) {
|
|
5
|
-
return fn.apply(context, args);
|
|
6
|
-
};
|
|
7
|
-
Object.assign(chain2, fn);
|
|
8
|
-
chain2.withContext = () => chain2.bind(context);
|
|
9
|
-
chain2.setContext = (key, value) => {
|
|
10
|
-
context[key] = value;
|
|
11
|
-
};
|
|
12
|
-
chain2.mergeContext = (ctx) => {
|
|
13
|
-
Object.assign(context, ctx);
|
|
14
|
-
};
|
|
15
|
-
for (const key of keys) {
|
|
16
|
-
Object.defineProperty(chain2, key, { get() {
|
|
17
|
-
return create({
|
|
18
|
-
...context,
|
|
19
|
-
[key]: true
|
|
20
|
-
});
|
|
21
|
-
} });
|
|
22
|
-
}
|
|
23
|
-
return chain2;
|
|
24
|
-
}
|
|
25
|
-
const chain = create({});
|
|
26
|
-
chain.fn = fn;
|
|
27
|
-
return chain;
|
|
28
|
-
}
|
|
29
|
-
function findTestFileStackTrace(testFilePath, error) {
|
|
30
|
-
const lines = error.split("\n").slice(1);
|
|
31
|
-
for (const line of lines) {
|
|
32
|
-
const stack = parseSingleStack(line);
|
|
33
|
-
if (stack && stack.file === testFilePath) {
|
|
34
|
-
return stack;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
function getNames(task) {
|
|
39
|
-
const names = [task.name];
|
|
40
|
-
let current = task;
|
|
41
|
-
while (current === null || current === void 0 ? void 0 : current.suite) {
|
|
42
|
-
current = current.suite;
|
|
43
|
-
if (current === null || current === void 0 ? void 0 : current.name) {
|
|
44
|
-
names.unshift(current.name);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
if (current !== task.file) {
|
|
48
|
-
names.unshift(task.file.name);
|
|
49
|
-
}
|
|
50
|
-
return names;
|
|
51
|
-
}
|
|
52
|
-
function createTaskName(names, separator = " > ") {
|
|
53
|
-
return names.filter((name) => name !== void 0).join(separator);
|
|
54
|
-
}
|
|
55
|
-
export {
|
|
56
|
-
createChainable as c,
|
|
57
|
-
createTaskName as e,
|
|
58
|
-
findTestFileStackTrace as f,
|
|
59
|
-
getNames as j
|
|
60
|
-
};
|