@rstest/core 0.2.1 → 0.2.2
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/{72.js → 171.js} +2 -1
- package/dist/{920.js → 33.js} +35 -32
- package/dist/{44.js → 350.js} +6 -5
- package/dist/{813.js → 607.js} +16 -15
- package/dist/{208.js → 655.js} +60 -59
- package/dist/{359.js → 698.js} +74 -66
- package/dist/{355.js → 704.js} +17 -16
- package/dist/{965.js → 711.js} +6 -5
- package/dist/{443.js → 755.js} +2 -1
- package/dist/{723.js → 829.js} +5 -4
- package/dist/{867.js → 85.js} +56 -55
- package/dist/{668.js → 928.js} +3 -2
- package/dist/{25.js → 967.js} +8 -7
- package/dist/{64.js → 969.js} +2 -1
- package/dist/{285.js → 971.js} +12 -11
- package/dist/{854.js → 985.js} +14 -13
- package/dist/index.js +83 -83
- package/dist/worker.js +38 -36
- package/dist-types/index.d.ts +1 -0
- package/dist-types/worker.d.ts +1 -0
- package/package.json +4 -4
- /package/dist/{208.js.LICENSE.txt → 655.js.LICENSE.txt} +0 -0
- /package/dist/{668.js.LICENSE.txt → 928.js.LICENSE.txt} +0 -0
package/dist/{72.js → 171.js}
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
+
export const __webpack_id__ = "171";
|
|
3
4
|
export const __webpack_ids__ = [
|
|
4
|
-
"
|
|
5
|
+
"171"
|
|
5
6
|
];
|
|
6
7
|
export const __webpack_modules__ = {
|
|
7
8
|
"../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js": function(__unused_webpack_module, exports) {
|
package/dist/{920.js → 33.js}
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
+
export const __webpack_id__ = "33";
|
|
3
4
|
export const __webpack_ids__ = [
|
|
4
|
-
"
|
|
5
|
+
"33"
|
|
5
6
|
];
|
|
6
7
|
export const __webpack_modules__ = {
|
|
7
8
|
"./src/core/runTests.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -10,7 +11,7 @@ export const __webpack_modules__ = {
|
|
|
10
11
|
});
|
|
11
12
|
var src_pool = __webpack_require__("./src/pool/index.ts");
|
|
12
13
|
var utils = __webpack_require__("./src/utils/index.ts");
|
|
13
|
-
const isCliShortcutsEnabled = ()=>(0, utils.
|
|
14
|
+
const isCliShortcutsEnabled = ()=>(0, utils.Un)('stdin');
|
|
14
15
|
async function setupCliShortcuts({ closeServer, runAll, updateSnapshot, runFailedTests, runWithTestNamePattern, runWithFileFilters }) {
|
|
15
16
|
const { createInterface, emitKeypressEvents } = await import("node:readline");
|
|
16
17
|
const rl = createInterface({
|
|
@@ -67,28 +68,28 @@ export const __webpack_modules__ = {
|
|
|
67
68
|
const shortcuts = [
|
|
68
69
|
{
|
|
69
70
|
key: 'f',
|
|
70
|
-
description: `${utils
|
|
71
|
+
description: `${utils.yW.bold('f')} ${utils.yW.dim('rerun failed tests')}`,
|
|
71
72
|
action: async ()=>{
|
|
72
73
|
await runFailedTests();
|
|
73
74
|
}
|
|
74
75
|
},
|
|
75
76
|
{
|
|
76
77
|
key: 'a',
|
|
77
|
-
description: `${utils
|
|
78
|
+
description: `${utils.yW.bold('a')} ${utils.yW.dim('rerun all tests')}`,
|
|
78
79
|
action: async ()=>{
|
|
79
80
|
await runAll();
|
|
80
81
|
}
|
|
81
82
|
},
|
|
82
83
|
{
|
|
83
84
|
key: 'u',
|
|
84
|
-
description: `${utils
|
|
85
|
+
description: `${utils.yW.bold('u')} ${utils.yW.dim('update snapshot')}`,
|
|
85
86
|
action: async ()=>{
|
|
86
87
|
await updateSnapshot();
|
|
87
88
|
}
|
|
88
89
|
},
|
|
89
90
|
{
|
|
90
91
|
key: 't',
|
|
91
|
-
description: `${utils
|
|
92
|
+
description: `${utils.yW.bold('t')} ${utils.yW.dim('filter by a test name regex pattern')}`,
|
|
92
93
|
action: async ()=>{
|
|
93
94
|
clearCurrentInputLine();
|
|
94
95
|
await promptInput('Enter test name pattern (empty to clear): ', async (pattern)=>{
|
|
@@ -98,7 +99,7 @@ export const __webpack_modules__ = {
|
|
|
98
99
|
},
|
|
99
100
|
{
|
|
100
101
|
key: 'p',
|
|
101
|
-
description: `${utils
|
|
102
|
+
description: `${utils.yW.bold('p')} ${utils.yW.dim('filter by a filename regex pattern')}`,
|
|
102
103
|
action: async ()=>{
|
|
103
104
|
clearCurrentInputLine();
|
|
104
105
|
await promptInput('Enter file name pattern (empty to clear): ', async (input)=>{
|
|
@@ -109,14 +110,14 @@ export const __webpack_modules__ = {
|
|
|
109
110
|
},
|
|
110
111
|
{
|
|
111
112
|
key: 'c',
|
|
112
|
-
description: `${utils
|
|
113
|
+
description: `${utils.yW.bold('c')} ${utils.yW.dim('clear console')}`,
|
|
113
114
|
action: ()=>{
|
|
114
115
|
console.clear();
|
|
115
116
|
}
|
|
116
117
|
},
|
|
117
118
|
{
|
|
118
119
|
key: 'q',
|
|
119
|
-
description: `${utils
|
|
120
|
+
description: `${utils.yW.bold('q')} ${utils.yW.dim('quit process')}`,
|
|
120
121
|
action: async ()=>{
|
|
121
122
|
try {
|
|
122
123
|
await closeServer();
|
|
@@ -136,9 +137,9 @@ export const __webpack_modules__ = {
|
|
|
136
137
|
}
|
|
137
138
|
if ('h' === str) {
|
|
138
139
|
clearCurrentInputLine();
|
|
139
|
-
let message =
|
|
140
|
+
let message = ` ${utils.yW.bold(utils.yW.blue('Shortcuts:'))}\n`;
|
|
140
141
|
for (const shortcut of shortcuts)message += ` ${shortcut.description}\n`;
|
|
141
|
-
utils.
|
|
142
|
+
utils.vF.log(message);
|
|
142
143
|
}
|
|
143
144
|
};
|
|
144
145
|
process.stdin.on('keypress', handleKeypress);
|
|
@@ -156,7 +157,7 @@ export const __webpack_modules__ = {
|
|
|
156
157
|
const { normalizedConfig: { include, exclude, root, name, setupFiles: setups, includeSource }, rootPath, reporters, snapshotManager, command } = context;
|
|
157
158
|
const entriesCache = new Map();
|
|
158
159
|
const globTestSourceEntries = async ()=>{
|
|
159
|
-
const entries = await (0, utils.
|
|
160
|
+
const entries = await (0, utils.tG)({
|
|
160
161
|
include,
|
|
161
162
|
exclude,
|
|
162
163
|
includeSource,
|
|
@@ -168,18 +169,18 @@ export const __webpack_modules__ = {
|
|
|
168
169
|
fileFilters: context.fileFilters
|
|
169
170
|
});
|
|
170
171
|
if (!Object.keys(entries).length) {
|
|
171
|
-
utils.
|
|
172
|
-
utils.
|
|
173
|
-
if (context.fileFilters?.length) utils.
|
|
174
|
-
utils.
|
|
175
|
-
utils.
|
|
176
|
-
utils.
|
|
172
|
+
utils.vF.log(utils.yW.red('No test files found.'));
|
|
173
|
+
utils.vF.log('');
|
|
174
|
+
if (context.fileFilters?.length) utils.vF.log(utils.yW.gray('filter: '), context.fileFilters.join(utils.yW.gray(', ')));
|
|
175
|
+
utils.vF.log(utils.yW.gray('include:'), include.join(utils.yW.gray(', ')));
|
|
176
|
+
utils.vF.log(utils.yW.gray('exclude:'), exclude.join(utils.yW.gray(', ')));
|
|
177
|
+
utils.vF.log('');
|
|
177
178
|
}
|
|
178
179
|
return entries;
|
|
179
180
|
};
|
|
180
|
-
const setupFiles = (0, utils.
|
|
181
|
+
const setupFiles = (0, utils.pr)(setups, rootPath);
|
|
181
182
|
const rsbuildInstance = await (0, rsbuild.z)(context, globTestSourceEntries, setupFiles);
|
|
182
|
-
const { getRsbuildStats, closeServer } = await (0, rsbuild.
|
|
183
|
+
const { getRsbuildStats, closeServer } = await (0, rsbuild.X)({
|
|
183
184
|
name,
|
|
184
185
|
normalizedConfig: context.normalizedConfig,
|
|
185
186
|
globTestSourceEntries: 'watch' === command ? globTestSourceEntries : async ()=>{
|
|
@@ -191,7 +192,7 @@ export const __webpack_modules__ = {
|
|
|
191
192
|
rootPath
|
|
192
193
|
});
|
|
193
194
|
const recommendWorkerCount = 'watch' === command ? 1 / 0 : Array.from(entriesCache.values()).reduce((acc, entry)=>acc + Object.keys(entry.entries).length, 0);
|
|
194
|
-
const pool = await (0, src_pool.
|
|
195
|
+
const pool = await (0, src_pool.b)({
|
|
195
196
|
context,
|
|
196
197
|
recommendWorkerCount
|
|
197
198
|
});
|
|
@@ -231,20 +232,22 @@ export const __webpack_modules__ = {
|
|
|
231
232
|
if ('watch' === command) {
|
|
232
233
|
const enableCliShortcuts = isCliShortcutsEnabled();
|
|
233
234
|
const afterTestsWatchRun = ()=>{
|
|
234
|
-
utils.
|
|
235
|
-
if (enableCliShortcuts) if (snapshotManager.summary.unmatched) utils.
|
|
236
|
-
else utils.
|
|
235
|
+
utils.vF.log(utils.yW.green(' Waiting for file changes...'));
|
|
236
|
+
if (enableCliShortcuts) if (snapshotManager.summary.unmatched) utils.vF.log(` ${utils.yW.dim('press')} ${utils.yW.yellow(utils.yW.bold('u'))} ${utils.yW.dim('to update snapshot')}${utils.yW.dim(', press')} ${utils.yW.bold('h')} ${utils.yW.dim('to show help')}\n`);
|
|
237
|
+
else utils.vF.log(` ${utils.yW.dim('press')} ${utils.yW.bold('h')} ${utils.yW.dim('to show help')}${utils.yW.dim(', press')} ${utils.yW.bold('q')} ${utils.yW.dim('to quit')}\n`);
|
|
237
238
|
};
|
|
238
239
|
const clearLogs = ()=>{
|
|
239
240
|
console.clear();
|
|
240
241
|
};
|
|
241
|
-
const { onBeforeRestart } = await __webpack_require__.e("
|
|
242
|
+
const { onBeforeRestart } = await __webpack_require__.e("967").then(__webpack_require__.bind(__webpack_require__, "./src/core/restart.ts"));
|
|
242
243
|
onBeforeRestart(async ()=>{
|
|
243
244
|
await pool.close();
|
|
244
245
|
await closeServer();
|
|
245
246
|
});
|
|
246
|
-
rsbuildInstance.
|
|
247
|
+
rsbuildInstance.onBeforeDevCompile(({ isFirstCompile })=>{
|
|
247
248
|
if (!isFirstCompile) clearLogs();
|
|
249
|
+
});
|
|
250
|
+
rsbuildInstance.onAfterDevCompile(async ({ isFirstCompile })=>{
|
|
248
251
|
snapshotManager.clear();
|
|
249
252
|
await run();
|
|
250
253
|
if (isFirstCompile && enableCliShortcuts) {
|
|
@@ -264,16 +267,16 @@ export const __webpack_modules__ = {
|
|
|
264
267
|
runWithTestNamePattern: async (pattern)=>{
|
|
265
268
|
clearLogs();
|
|
266
269
|
context.normalizedConfig.testNamePattern = pattern;
|
|
267
|
-
if (pattern) utils.
|
|
268
|
-
else utils.
|
|
270
|
+
if (pattern) utils.vF.log(`\n${utils.yW.dim('Applied testNamePattern:')} ${utils.yW.bold(pattern)}\n`);
|
|
271
|
+
else utils.vF.log(`\n${utils.yW.dim('Cleared testNamePattern filter')}\n`);
|
|
269
272
|
snapshotManager.clear();
|
|
270
273
|
await run();
|
|
271
274
|
afterTestsWatchRun();
|
|
272
275
|
},
|
|
273
276
|
runWithFileFilters: async (filters)=>{
|
|
274
277
|
clearLogs();
|
|
275
|
-
if (filters && filters.length > 0) utils.
|
|
276
|
-
else utils.
|
|
278
|
+
if (filters && filters.length > 0) utils.vF.log(`\n${utils.yW.dim('Applied file filters:')} ${utils.yW.bold(filters.join(', '))}\n`);
|
|
279
|
+
else utils.vF.log(`\n${utils.yW.dim('Cleared file filters')}\n`);
|
|
277
280
|
snapshotManager.clear();
|
|
278
281
|
context.fileFilters = filters;
|
|
279
282
|
const entries = await globTestSourceEntries();
|
|
@@ -285,7 +288,7 @@ export const __webpack_modules__ = {
|
|
|
285
288
|
},
|
|
286
289
|
runFailedTests: async ()=>{
|
|
287
290
|
const failedTests = testFileResult.filter((result)=>'fail' === result.status).map((r)=>r.testPath);
|
|
288
|
-
if (!failedTests.length) return void utils.
|
|
291
|
+
if (!failedTests.length) return void utils.vF.log(utils.yW.yellow('\nNo failed tests were found that needed to be rerun.'));
|
|
289
292
|
clearLogs();
|
|
290
293
|
snapshotManager.clear();
|
|
291
294
|
await run({
|
|
@@ -294,7 +297,7 @@ export const __webpack_modules__ = {
|
|
|
294
297
|
afterTestsWatchRun();
|
|
295
298
|
},
|
|
296
299
|
updateSnapshot: async ()=>{
|
|
297
|
-
if (!snapshotManager.summary.unmatched) return void utils.
|
|
300
|
+
if (!snapshotManager.summary.unmatched) return void utils.vF.log(utils.yW.yellow('\nNo snapshots were found that needed to be updated.'));
|
|
298
301
|
const failedTests = testFileResult.filter((result)=>result.snapshotResult?.unmatched).map((r)=>r.testPath);
|
|
299
302
|
clearLogs();
|
|
300
303
|
const originalUpdateSnapshot = snapshotManager.options.updateSnapshot;
|
package/dist/{44.js → 350.js}
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
+
export const __webpack_id__ = "350";
|
|
3
4
|
export const __webpack_ids__ = [
|
|
4
|
-
"
|
|
5
|
+
"350"
|
|
5
6
|
];
|
|
6
7
|
export const __webpack_modules__ = {
|
|
7
8
|
"./src/runtime/worker/env/happyDom.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -18,7 +19,7 @@ export const __webpack_modules__ = {
|
|
|
18
19
|
url: happyDom.url || 'http://localhost:3000',
|
|
19
20
|
console: console && global.console ? global.console : void 0
|
|
20
21
|
});
|
|
21
|
-
const cleanupGlobal = (0, _utils__WEBPACK_IMPORTED_MODULE_0__.
|
|
22
|
+
const cleanupGlobal = (0, _utils__WEBPACK_IMPORTED_MODULE_0__.p5)(global, win, {
|
|
22
23
|
additionalKeys: [
|
|
23
24
|
'Request',
|
|
24
25
|
'Response',
|
|
@@ -26,7 +27,7 @@ export const __webpack_modules__ = {
|
|
|
26
27
|
'fetch'
|
|
27
28
|
]
|
|
28
29
|
});
|
|
29
|
-
const cleanupHandler = (0, _utils__WEBPACK_IMPORTED_MODULE_0__.
|
|
30
|
+
const cleanupHandler = (0, _utils__WEBPACK_IMPORTED_MODULE_0__.d1)(global);
|
|
30
31
|
return {
|
|
31
32
|
async teardown () {
|
|
32
33
|
cleanupHandler();
|
|
@@ -42,8 +43,8 @@ export const __webpack_modules__ = {
|
|
|
42
43
|
},
|
|
43
44
|
"./src/runtime/worker/env/utils.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
44
45
|
__webpack_require__.d(__webpack_exports__, {
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
d1: ()=>addDefaultErrorHandler,
|
|
47
|
+
p5: ()=>installGlobal
|
|
47
48
|
});
|
|
48
49
|
const LIVING_KEYS = [
|
|
49
50
|
'DOMException',
|
package/dist/{813.js → 607.js}
RENAMED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
+
export const __webpack_id__ = "607";
|
|
3
4
|
export const __webpack_ids__ = [
|
|
4
|
-
"
|
|
5
|
+
"607"
|
|
5
6
|
];
|
|
6
7
|
export const __webpack_modules__ = {
|
|
7
8
|
"./src/runtime/worker/console.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
@@ -30,13 +31,13 @@ export const __webpack_modules__ = {
|
|
|
30
31
|
getPrettyName(type) {
|
|
31
32
|
switch(type){
|
|
32
33
|
case 'error':
|
|
33
|
-
return _utils__WEBPACK_IMPORTED_MODULE_3__
|
|
34
|
+
return _utils__WEBPACK_IMPORTED_MODULE_3__.yW.red(type);
|
|
34
35
|
case 'warn':
|
|
35
|
-
return _utils__WEBPACK_IMPORTED_MODULE_3__
|
|
36
|
+
return _utils__WEBPACK_IMPORTED_MODULE_3__.yW.yellow(type);
|
|
36
37
|
case 'info':
|
|
37
|
-
return _utils__WEBPACK_IMPORTED_MODULE_3__
|
|
38
|
+
return _utils__WEBPACK_IMPORTED_MODULE_3__.yW.cyan(type);
|
|
38
39
|
default:
|
|
39
|
-
return _utils__WEBPACK_IMPORTED_MODULE_3__
|
|
40
|
+
return _utils__WEBPACK_IMPORTED_MODULE_3__.yW.gray(type);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
_log(name, message, type = 'stdout') {
|
|
@@ -78,11 +79,11 @@ export const __webpack_modules__ = {
|
|
|
78
79
|
}
|
|
79
80
|
group(title, ...args) {
|
|
80
81
|
this._groupDepth++;
|
|
81
|
-
if (null != title || args.length > 0) this._log('group', _utils__WEBPACK_IMPORTED_MODULE_3__
|
|
82
|
+
if (null != title || args.length > 0) this._log('group', _utils__WEBPACK_IMPORTED_MODULE_3__.yW.bold((0, node_util__WEBPACK_IMPORTED_MODULE_2__.format)(title, ...args)));
|
|
82
83
|
}
|
|
83
84
|
groupCollapsed(title, ...args) {
|
|
84
85
|
this._groupDepth++;
|
|
85
|
-
if (null != title || args.length > 0) this._log('groupCollapsed', _utils__WEBPACK_IMPORTED_MODULE_3__
|
|
86
|
+
if (null != title || args.length > 0) this._log('groupCollapsed', _utils__WEBPACK_IMPORTED_MODULE_3__.yW.bold((0, node_util__WEBPACK_IMPORTED_MODULE_2__.format)(title, ...args)));
|
|
86
87
|
}
|
|
87
88
|
groupEnd() {
|
|
88
89
|
if (this._groupDepth > 0) this._groupDepth--;
|
|
@@ -102,7 +103,7 @@ export const __webpack_modules__ = {
|
|
|
102
103
|
if (null != startTime) {
|
|
103
104
|
const endTime = RealDate.now();
|
|
104
105
|
const time = endTime - startTime.getTime();
|
|
105
|
-
this._log('time', (0, node_util__WEBPACK_IMPORTED_MODULE_2__.format)(`${label}: ${(0, _utils__WEBPACK_IMPORTED_MODULE_3__.
|
|
106
|
+
this._log('time', (0, node_util__WEBPACK_IMPORTED_MODULE_2__.format)(`${label}: ${(0, _utils__WEBPACK_IMPORTED_MODULE_3__.kV)(time)}`));
|
|
106
107
|
delete this._timers[label];
|
|
107
108
|
}
|
|
108
109
|
}
|
|
@@ -111,7 +112,7 @@ export const __webpack_modules__ = {
|
|
|
111
112
|
if (null != startTime) {
|
|
112
113
|
const endTime = new RealDate();
|
|
113
114
|
const time = endTime.getTime() - startTime.getTime();
|
|
114
|
-
this._log('time', (0, node_util__WEBPACK_IMPORTED_MODULE_2__.format)(`${label}: ${(0, _utils__WEBPACK_IMPORTED_MODULE_3__.
|
|
115
|
+
this._log('time', (0, node_util__WEBPACK_IMPORTED_MODULE_2__.format)(`${label}: ${(0, _utils__WEBPACK_IMPORTED_MODULE_3__.kV)(time)}`, ...data));
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
118
|
warn(firstArg, ...args) {
|
|
@@ -124,12 +125,12 @@ export const __webpack_modules__ = {
|
|
|
124
125
|
},
|
|
125
126
|
"./src/utils/index.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
126
127
|
__webpack_require__.d(__webpack_exports__, {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
fN: ()=>helper.fN,
|
|
129
|
+
Gv: ()=>helper.Gv,
|
|
130
|
+
kV: ()=>helper.kV,
|
|
131
|
+
q_: ()=>constants.q_,
|
|
132
|
+
bg: ()=>helper.bg,
|
|
133
|
+
yW: ()=>helper.yW
|
|
133
134
|
});
|
|
134
135
|
var constants = __webpack_require__("./src/utils/constants.ts");
|
|
135
136
|
var helper = __webpack_require__("./src/utils/helper.ts");
|
package/dist/{208.js → 655.js}
RENAMED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
/*! For license information please see
|
|
1
|
+
/*! For license information please see 655.js.LICENSE.txt */
|
|
2
2
|
import 'module';
|
|
3
3
|
/*#__PURE__*/ import.meta.url;
|
|
4
|
+
export const __webpack_id__ = "655";
|
|
4
5
|
export const __webpack_ids__ = [
|
|
5
|
-
"
|
|
6
|
+
"655"
|
|
6
7
|
];
|
|
7
8
|
export const __webpack_modules__ = {
|
|
8
9
|
"../../node_modules/.pnpm/@sinonjs+commons@3.0.1/node_modules/@sinonjs/commons/lib/called-in-order.js": function(module, __unused_webpack_exports, __webpack_require__) {
|
|
@@ -1308,18 +1309,18 @@ export const __webpack_modules__ = {
|
|
|
1308
1309
|
},
|
|
1309
1310
|
"../../node_modules/.pnpm/@vitest+expect@3.2.4/node_modules/@vitest/expect/dist/index.js": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1310
1311
|
__webpack_require__.d(__webpack_exports__, {
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1312
|
+
Mc: ()=>JestAsymmetricMatchers,
|
|
1313
|
+
mZ: ()=>GLOBAL_EXPECT,
|
|
1314
|
+
fs: ()=>ASYMMETRIC_MATCHERS_OBJECT,
|
|
1315
|
+
TB: ()=>addCustomEqualityTesters,
|
|
1316
|
+
wb: ()=>setState,
|
|
1317
|
+
Pf: ()=>customMatchers,
|
|
1318
|
+
aI: ()=>dist_equals,
|
|
1319
|
+
Xs: ()=>JestExtend,
|
|
1320
|
+
Gu: ()=>getState,
|
|
1321
|
+
D: ()=>iterableEquality,
|
|
1322
|
+
j2: ()=>subsetEquality,
|
|
1323
|
+
dB: ()=>JestChaiExpect
|
|
1323
1324
|
});
|
|
1324
1325
|
var dist = __webpack_require__("../../node_modules/.pnpm/@vitest+pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js");
|
|
1325
1326
|
const ansiColors = {
|
|
@@ -1833,7 +1834,7 @@ export const __webpack_modules__ = {
|
|
|
1833
1834
|
if (value === Object(value)) return inspectObject(value, options);
|
|
1834
1835
|
return options.stylize(String(value), type);
|
|
1835
1836
|
}
|
|
1836
|
-
const { AsymmetricMatcher, DOMCollection, DOMElement, Immutable, ReactElement, ReactTestComponent } = dist.
|
|
1837
|
+
const { AsymmetricMatcher, DOMCollection, DOMElement, Immutable, ReactElement, ReactTestComponent } = dist.Nx;
|
|
1837
1838
|
const PLUGINS = [
|
|
1838
1839
|
ReactTestComponent,
|
|
1839
1840
|
ReactElement,
|
|
@@ -1846,14 +1847,14 @@ export const __webpack_modules__ = {
|
|
|
1846
1847
|
const MAX_LENGTH = maxLength ?? 1e4;
|
|
1847
1848
|
let result;
|
|
1848
1849
|
try {
|
|
1849
|
-
result = (0, dist.
|
|
1850
|
+
result = (0, dist.GP)(object, {
|
|
1850
1851
|
maxDepth,
|
|
1851
1852
|
escapeString: false,
|
|
1852
1853
|
plugins: PLUGINS,
|
|
1853
1854
|
...options
|
|
1854
1855
|
});
|
|
1855
1856
|
} catch {
|
|
1856
|
-
result = (0, dist.
|
|
1857
|
+
result = (0, dist.GP)(object, {
|
|
1857
1858
|
callToJSON: false,
|
|
1858
1859
|
maxDepth,
|
|
1859
1860
|
escapeString: false,
|
|
@@ -2749,14 +2750,14 @@ export const __webpack_modules__ = {
|
|
|
2749
2750
|
function getDefaultOptions() {
|
|
2750
2751
|
return {
|
|
2751
2752
|
aAnnotation: "Expected",
|
|
2752
|
-
aColor: dist_node.
|
|
2753
|
+
aColor: dist_node.Ay.green,
|
|
2753
2754
|
aIndicator: "-",
|
|
2754
2755
|
bAnnotation: "Received",
|
|
2755
|
-
bColor: dist_node.
|
|
2756
|
+
bColor: dist_node.Ay.red,
|
|
2756
2757
|
bIndicator: "+",
|
|
2757
|
-
changeColor: dist_node.
|
|
2758
|
+
changeColor: dist_node.Ay.inverse,
|
|
2758
2759
|
changeLineTrailingSpaceColor: noColor,
|
|
2759
|
-
commonColor: dist_node.
|
|
2760
|
+
commonColor: dist_node.Ay.dim,
|
|
2760
2761
|
commonIndicator: " ",
|
|
2761
2762
|
commonLineTrailingSpaceColor: noColor,
|
|
2762
2763
|
compareKeys: void 0,
|
|
@@ -2765,7 +2766,7 @@ export const __webpack_modules__ = {
|
|
|
2765
2766
|
expand: false,
|
|
2766
2767
|
includeChangeCounts: false,
|
|
2767
2768
|
omitAnnotationLines: false,
|
|
2768
|
-
patchColor: dist_node.
|
|
2769
|
+
patchColor: dist_node.Ay.yellow,
|
|
2769
2770
|
printBasicPrototype: false,
|
|
2770
2771
|
truncateThreshold: DIFF_TRUNCATE_THRESHOLD_DEFAULT,
|
|
2771
2772
|
truncateAnnotation: "... Diff result is truncated",
|
|
@@ -3089,7 +3090,7 @@ export const __webpack_modules__ = {
|
|
|
3089
3090
|
const { commonColor } = normalizeDiffOptions(options);
|
|
3090
3091
|
return commonColor(message);
|
|
3091
3092
|
}
|
|
3092
|
-
const { AsymmetricMatcher: diff_AsymmetricMatcher, DOMCollection: diff_DOMCollection, DOMElement: diff_DOMElement, Immutable: diff_Immutable, ReactElement: diff_ReactElement, ReactTestComponent: diff_ReactTestComponent } = dist.
|
|
3093
|
+
const { AsymmetricMatcher: diff_AsymmetricMatcher, DOMCollection: diff_DOMCollection, DOMElement: diff_DOMElement, Immutable: diff_Immutable, ReactElement: diff_ReactElement, ReactTestComponent: diff_ReactTestComponent } = dist.Nx;
|
|
3093
3094
|
const diff_PLUGINS = [
|
|
3094
3095
|
diff_ReactTestComponent,
|
|
3095
3096
|
diff_ReactElement,
|
|
@@ -3097,7 +3098,7 @@ export const __webpack_modules__ = {
|
|
|
3097
3098
|
diff_DOMCollection,
|
|
3098
3099
|
diff_Immutable,
|
|
3099
3100
|
diff_AsymmetricMatcher,
|
|
3100
|
-
dist.
|
|
3101
|
+
dist.Nx.Error
|
|
3101
3102
|
];
|
|
3102
3103
|
const FORMAT_OPTIONS = {
|
|
3103
3104
|
maxDepth: 20,
|
|
@@ -3122,8 +3123,8 @@ export const __webpack_modules__ = {
|
|
|
3122
3123
|
if (expectedType !== diff_getType(b)) {
|
|
3123
3124
|
const { aAnnotation, aColor, aIndicator, bAnnotation, bColor, bIndicator } = normalizeDiffOptions(options);
|
|
3124
3125
|
const formatOptions = getFormatOptions(FALLBACK_FORMAT_OPTIONS, options);
|
|
3125
|
-
let aDisplay = (0, dist.
|
|
3126
|
-
let bDisplay = (0, dist.
|
|
3126
|
+
let aDisplay = (0, dist.GP)(a, formatOptions);
|
|
3127
|
+
let bDisplay = (0, dist.GP)(b, formatOptions);
|
|
3127
3128
|
const MAX_LENGTH = 1e5;
|
|
3128
3129
|
function truncate(s) {
|
|
3129
3130
|
return s.length <= MAX_LENGTH ? s : `${s.slice(0, MAX_LENGTH)}...`;
|
|
@@ -3150,8 +3151,8 @@ export const __webpack_modules__ = {
|
|
|
3150
3151
|
}
|
|
3151
3152
|
}
|
|
3152
3153
|
function comparePrimitive(a, b, options) {
|
|
3153
|
-
const aFormat = (0, dist.
|
|
3154
|
-
const bFormat = (0, dist.
|
|
3154
|
+
const aFormat = (0, dist.GP)(a, FORMAT_OPTIONS);
|
|
3155
|
+
const bFormat = (0, dist.GP)(b, FORMAT_OPTIONS);
|
|
3155
3156
|
return aFormat === bFormat ? "" : diffLinesUnified(aFormat.split("\n"), bFormat.split("\n"), options);
|
|
3156
3157
|
}
|
|
3157
3158
|
function sortMap(map) {
|
|
@@ -3191,12 +3192,12 @@ export const __webpack_modules__ = {
|
|
|
3191
3192
|
...formatOptions,
|
|
3192
3193
|
indent: 0
|
|
3193
3194
|
};
|
|
3194
|
-
const aCompare = (0, dist.
|
|
3195
|
-
const bCompare = (0, dist.
|
|
3195
|
+
const aCompare = (0, dist.GP)(a, formatOptionsZeroIndent);
|
|
3196
|
+
const bCompare = (0, dist.GP)(b, formatOptionsZeroIndent);
|
|
3196
3197
|
if (aCompare === bCompare) return getCommonMessage(NO_DIFF_MESSAGE, options);
|
|
3197
3198
|
{
|
|
3198
|
-
const aDisplay = (0, dist.
|
|
3199
|
-
const bDisplay = (0, dist.
|
|
3199
|
+
const aDisplay = (0, dist.GP)(a, formatOptions);
|
|
3200
|
+
const bDisplay = (0, dist.GP)(b, formatOptions);
|
|
3200
3201
|
return diffLinesUnified2(aDisplay.split("\n"), bDisplay.split("\n"), aCompare.split("\n"), bCompare.split("\n"), options);
|
|
3201
3202
|
}
|
|
3202
3203
|
}
|
|
@@ -3276,13 +3277,13 @@ export const __webpack_modules__ = {
|
|
|
3276
3277
|
return text.replace(/\s+$/gm, (spaces)=>SPACE_SYMBOL.repeat(spaces.length));
|
|
3277
3278
|
}
|
|
3278
3279
|
function diff_printReceived(object) {
|
|
3279
|
-
return dist_node.
|
|
3280
|
+
return dist_node.Ay.red(replaceTrailingSpaces(stringify(object)));
|
|
3280
3281
|
}
|
|
3281
3282
|
function diff_printExpected(value) {
|
|
3282
|
-
return dist_node.
|
|
3283
|
+
return dist_node.Ay.green(replaceTrailingSpaces(stringify(value)));
|
|
3283
3284
|
}
|
|
3284
3285
|
function getCommonAndChangedSubstrings(diffs, op, hasCommonDiff) {
|
|
3285
|
-
return diffs.reduce((reduced, diff)=>reduced + (diff[0] === DIFF_EQUAL ? diff[1] : diff[0] === op ? hasCommonDiff ? dist_node.
|
|
3286
|
+
return diffs.reduce((reduced, diff)=>reduced + (diff[0] === DIFF_EQUAL ? diff[1] : diff[0] === op ? hasCommonDiff ? dist_node.Ay.inverse(diff[1]) : diff[1] : ""), "");
|
|
3286
3287
|
}
|
|
3287
3288
|
__webpack_require__("../../node_modules/.pnpm/tinyspy@4.0.3/node_modules/tinyspy/dist/index.js");
|
|
3288
3289
|
new Set();
|
|
@@ -3439,11 +3440,11 @@ ${printReceived(actual)}`
|
|
|
3439
3440
|
};
|
|
3440
3441
|
}
|
|
3441
3442
|
};
|
|
3442
|
-
const EXPECTED_COLOR = dist_node.
|
|
3443
|
-
const RECEIVED_COLOR = dist_node.
|
|
3444
|
-
const INVERTED_COLOR = dist_node.
|
|
3445
|
-
const BOLD_WEIGHT = dist_node.
|
|
3446
|
-
const DIM_COLOR = dist_node.
|
|
3443
|
+
const EXPECTED_COLOR = dist_node.Ay.green;
|
|
3444
|
+
const RECEIVED_COLOR = dist_node.Ay.red;
|
|
3445
|
+
const INVERTED_COLOR = dist_node.Ay.inverse;
|
|
3446
|
+
const BOLD_WEIGHT = dist_node.Ay.bold;
|
|
3447
|
+
const DIM_COLOR = dist_node.Ay.dim;
|
|
3447
3448
|
function dist_matcherHint(matcherName, received = "received", expected = "expected", options = {}) {
|
|
3448
3449
|
const { comment = "", isDirectExpectCall = false, isNot = false, promise = "", secondArgument = "", expectedColor = EXPECTED_COLOR, receivedColor = RECEIVED_COLOR, secondArgumentColor = EXPECTED_COLOR } = options;
|
|
3449
3450
|
let hint = "";
|
|
@@ -4774,8 +4775,8 @@ ${printReceived(actual)}`
|
|
|
4774
4775
|
return `${i}th`;
|
|
4775
4776
|
}
|
|
4776
4777
|
function formatCalls(spy, msg, showActualCall) {
|
|
4777
|
-
if (spy.mock.calls.length) msg += dist_node.
|
|
4778
|
-
let methodCall = dist_node.
|
|
4778
|
+
if (spy.mock.calls.length) msg += dist_node.Ay.gray(`\n\nReceived: \n\n${spy.mock.calls.map((callArg, i)=>{
|
|
4779
|
+
let methodCall = dist_node.Ay.bold(` ${ordinalOf(i + 1)} ${spy.getMockName()} call:\n\n`);
|
|
4779
4780
|
if (showActualCall) methodCall += diff_diff(showActualCall, callArg, {
|
|
4780
4781
|
omitAnnotationLines: true
|
|
4781
4782
|
});
|
|
@@ -4783,12 +4784,12 @@ ${printReceived(actual)}`
|
|
|
4783
4784
|
methodCall += "\n";
|
|
4784
4785
|
return methodCall;
|
|
4785
4786
|
}).join("\n")}`);
|
|
4786
|
-
msg += dist_node.
|
|
4787
|
+
msg += dist_node.Ay.gray(`\n\nNumber of calls: ${dist_node.Ay.bold(spy.mock.calls.length)}\n`);
|
|
4787
4788
|
return msg;
|
|
4788
4789
|
}
|
|
4789
4790
|
function formatReturns(spy, results, msg, showActualReturn) {
|
|
4790
|
-
if (results.length) msg += dist_node.
|
|
4791
|
-
let methodCall = dist_node.
|
|
4791
|
+
if (results.length) msg += dist_node.Ay.gray(`\n\nReceived: \n\n${results.map((callReturn, i)=>{
|
|
4792
|
+
let methodCall = dist_node.Ay.bold(` ${ordinalOf(i + 1)} ${spy.getMockName()} call return:\n\n`);
|
|
4792
4793
|
if (showActualReturn) methodCall += diff_diff(showActualReturn, callReturn.value, {
|
|
4793
4794
|
omitAnnotationLines: true
|
|
4794
4795
|
});
|
|
@@ -4796,7 +4797,7 @@ ${printReceived(actual)}`
|
|
|
4796
4797
|
methodCall += "\n";
|
|
4797
4798
|
return methodCall;
|
|
4798
4799
|
}).join("\n")}`);
|
|
4799
|
-
msg += dist_node.
|
|
4800
|
+
msg += dist_node.Ay.gray(`\n\nNumber of calls: ${dist_node.Ay.bold(spy.mock.calls.length)}\n`);
|
|
4800
4801
|
return msg;
|
|
4801
4802
|
}
|
|
4802
4803
|
function getMatcherState(assertion, expect) {
|
|
@@ -4900,8 +4901,8 @@ ${printReceived(actual)}`
|
|
|
4900
4901
|
},
|
|
4901
4902
|
"../../node_modules/.pnpm/@vitest+pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
4902
4903
|
__webpack_require__.d(__webpack_exports__, {
|
|
4903
|
-
|
|
4904
|
-
|
|
4904
|
+
GP: ()=>format,
|
|
4905
|
+
Nx: ()=>plugins
|
|
4905
4906
|
});
|
|
4906
4907
|
var tinyrainbow__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js");
|
|
4907
4908
|
function _mergeNamespaces(n, m) {
|
|
@@ -5970,7 +5971,7 @@ ${printReceived(actual)}`
|
|
|
5970
5971
|
function getColorsHighlight() {
|
|
5971
5972
|
return DEFAULT_THEME_KEYS.reduce((colors, key)=>{
|
|
5972
5973
|
const value = DEFAULT_THEME[key];
|
|
5973
|
-
const color = value && tinyrainbow__WEBPACK_IMPORTED_MODULE_0__.
|
|
5974
|
+
const color = value && tinyrainbow__WEBPACK_IMPORTED_MODULE_0__.Ay[value];
|
|
5974
5975
|
if (color && "string" == typeof color.close && "string" == typeof color.open) colors[key] = color;
|
|
5975
5976
|
else throw new Error(`pretty-format: Option "theme" has a key "${key}" whose value "${value}" is undefined in ansi-styles.`);
|
|
5976
5977
|
return colors;
|
|
@@ -6041,9 +6042,9 @@ ${printReceived(actual)}`
|
|
|
6041
6042
|
},
|
|
6042
6043
|
"../../node_modules/.pnpm/@vitest+snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
6043
6044
|
__webpack_require__.d(__webpack_exports__, {
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6045
|
+
U$: ()=>addSerializer,
|
|
6046
|
+
cN: ()=>stripSnapshotIndentation,
|
|
6047
|
+
s: ()=>SnapshotClient
|
|
6047
6048
|
});
|
|
6048
6049
|
var pathe__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("pathe");
|
|
6049
6050
|
var _vitest_pretty_format__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/@vitest+pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js");
|
|
@@ -6632,7 +6633,7 @@ ${printReceived(actual)}`
|
|
|
6632
6633
|
const { getPromiseDetails, kPending, kRejected } = process.binding('util');
|
|
6633
6634
|
Array.isArray(getPromiseDetails(Promise.resolve()));
|
|
6634
6635
|
} catch (notNode) {}
|
|
6635
|
-
const { AsymmetricMatcher: AsymmetricMatcher$1, DOMCollection: DOMCollection$1, DOMElement: DOMElement$1, Immutable: Immutable$1, ReactElement: ReactElement$1, ReactTestComponent: ReactTestComponent$1 } = _vitest_pretty_format__WEBPACK_IMPORTED_MODULE_1__.
|
|
6636
|
+
const { AsymmetricMatcher: AsymmetricMatcher$1, DOMCollection: DOMCollection$1, DOMElement: DOMElement$1, Immutable: Immutable$1, ReactElement: ReactElement$1, ReactTestComponent: ReactTestComponent$1 } = _vitest_pretty_format__WEBPACK_IMPORTED_MODULE_1__.Nx;
|
|
6636
6637
|
function getDefaultExportFromCjs(x) {
|
|
6637
6638
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
6638
6639
|
}
|
|
@@ -7300,7 +7301,7 @@ ${printReceived(actual)}`
|
|
|
7300
7301
|
return line + 1;
|
|
7301
7302
|
}
|
|
7302
7303
|
async function saveInlineSnapshots(environment, snapshots) {
|
|
7303
|
-
const MagicString = (await __webpack_require__.e("
|
|
7304
|
+
const MagicString = (await __webpack_require__.e("755").then(__webpack_require__.bind(__webpack_require__, "../../node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.mjs"))).default;
|
|
7304
7305
|
const files = new Set(snapshots.map((i)=>i.file));
|
|
7305
7306
|
await Promise.all(Array.from(files).map(async (file)=>{
|
|
7306
7307
|
const snaps = snapshots.filter((i)=>i.file === file);
|
|
@@ -7469,7 +7470,7 @@ ${printReceived(actual)}`
|
|
|
7469
7470
|
serialize: serialize$1,
|
|
7470
7471
|
test
|
|
7471
7472
|
};
|
|
7472
|
-
const { DOMCollection, DOMElement, Immutable, ReactElement, ReactTestComponent, AsymmetricMatcher } = _vitest_pretty_format__WEBPACK_IMPORTED_MODULE_1__.
|
|
7473
|
+
const { DOMCollection, DOMElement, Immutable, ReactElement, ReactTestComponent, AsymmetricMatcher } = _vitest_pretty_format__WEBPACK_IMPORTED_MODULE_1__.Nx;
|
|
7473
7474
|
let PLUGINS = [
|
|
7474
7475
|
ReactTestComponent,
|
|
7475
7476
|
ReactElement,
|
|
@@ -7520,7 +7521,7 @@ ${printReceived(actual)}`
|
|
|
7520
7521
|
const escapeRegex = true;
|
|
7521
7522
|
const printFunctionName = false;
|
|
7522
7523
|
function serialize(val, indent = 2, formatOverrides = {}) {
|
|
7523
|
-
return normalizeNewlines((0, _vitest_pretty_format__WEBPACK_IMPORTED_MODULE_1__.
|
|
7524
|
+
return normalizeNewlines((0, _vitest_pretty_format__WEBPACK_IMPORTED_MODULE_1__.GP)(val, {
|
|
7524
7525
|
escapeRegex,
|
|
7525
7526
|
indent,
|
|
7526
7527
|
plugins: getSerializers(),
|
|
@@ -7977,7 +7978,7 @@ ${printReceived(actual)}`
|
|
|
7977
7978
|
},
|
|
7978
7979
|
"../../node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/node.js": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
7979
7980
|
__webpack_require__.d(__webpack_exports__, {
|
|
7980
|
-
|
|
7981
|
+
Ay: ()=>node_u
|
|
7981
7982
|
});
|
|
7982
7983
|
var f = {
|
|
7983
7984
|
reset: [
|
|
@@ -8180,8 +8181,8 @@ ${printReceived(actual)}`
|
|
|
8180
8181
|
},
|
|
8181
8182
|
"../../node_modules/.pnpm/tinyspy@4.0.3/node_modules/tinyspy/dist/index.js": function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
8182
8183
|
__webpack_require__.d(__webpack_exports__, {
|
|
8183
|
-
|
|
8184
|
-
|
|
8184
|
+
jo: ()=>internalSpyOn,
|
|
8185
|
+
lf: ()=>getInternalState
|
|
8185
8186
|
});
|
|
8186
8187
|
function assert(condition, message) {
|
|
8187
8188
|
if (!condition) throw new Error(message);
|