@rstest/core 0.9.5 → 0.9.7
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/LICENSE.md +80 -0
- package/dist/0~8843.js +15 -1
- package/dist/{0~lib.js → 0~@babel/code-frame.js} +2 -2
- package/dist/0~@clack/prompts.js +1044 -0
- package/dist/0~browserLoader.js +1 -1
- package/dist/0~browser~1.js +17 -17
- package/dist/0~checkThresholds.js +1 -1
- package/dist/0~chokidar.js +43 -42
- package/dist/0~fake-timers.js +381 -228
- package/dist/0~generate.js +1 -2
- package/dist/0~listTests.js +67 -7
- package/dist/0~magic-string.es.js +1 -181
- package/dist/0~restart.js +1 -1
- package/dist/0~snapshot.js +1 -1
- package/dist/1255.js +11 -11
- package/dist/3145.js +275 -25
- package/dist/4411.js +127 -139
- package/dist/6830.js +1 -1
- package/dist/7290.js +15 -0
- package/dist/9743.js +1 -1
- package/dist/9784.js +1 -1
- package/dist/browser-runtime/2~fake-timers.js +389 -403
- package/dist/browser-runtime/2~magic-string.es.js +5 -191
- package/dist/browser-runtime/2~snapshot.js +2 -2
- package/dist/browser-runtime/723.js +77 -15
- package/dist/browser-runtime/index.d.ts +32 -62
- package/dist/browser.d.ts +32 -62
- package/dist/globalSetupWorker.js +1 -1
- package/dist/index.d.ts +56 -68
- package/dist/index.js +1 -1
- package/dist/worker.d.ts +18 -6
- package/dist/worker.js +1 -1
- package/globals.d.ts +1 -0
- package/package.json +13 -14
- package/dist/0~dist.js +0 -1014
- package/dist/4899.js +0 -11
- package/dist/browser-runtime/rslib-runtime.js +0 -49
- /package/dist/{rslib-runtime.js → 0~rslib-runtime.js} +0 -0
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import { __webpack_require__ } from "./
|
|
1
|
+
import { __webpack_require__ } from "./723.js";
|
|
2
2
|
import "./723.js";
|
|
3
|
-
var
|
|
4
|
-
__webpack_require__.r(magic_string_es_namespaceObject);
|
|
5
|
-
__webpack_require__.d(magic_string_es_namespaceObject, {
|
|
6
|
-
Bundle: ()=>Bundle,
|
|
7
|
-
SourceMap: ()=>SourceMap,
|
|
8
|
-
default: ()=>MagicString
|
|
9
|
-
});
|
|
10
|
-
var Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["Buffer"];
|
|
3
|
+
var Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["hp"];
|
|
11
4
|
var comma = ",".charCodeAt(0);
|
|
12
5
|
var semicolon = ";".charCodeAt(0);
|
|
13
6
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
@@ -86,7 +79,7 @@ function encode(decoded) {
|
|
|
86
79
|
}
|
|
87
80
|
return writer.flush();
|
|
88
81
|
}
|
|
89
|
-
var magic_string_es_Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["
|
|
82
|
+
var magic_string_es_Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["hp"];
|
|
90
83
|
class BitSet {
|
|
91
84
|
constructor(arg){
|
|
92
85
|
this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
|
|
@@ -1033,184 +1026,5 @@ class MagicString {
|
|
|
1033
1026
|
return this._replaceRegexp(searchValue, replacement);
|
|
1034
1027
|
}
|
|
1035
1028
|
}
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
constructor(options = {}){
|
|
1039
|
-
this.intro = options.intro || '';
|
|
1040
|
-
this.separator = void 0 !== options.separator ? options.separator : '\n';
|
|
1041
|
-
this.sources = [];
|
|
1042
|
-
this.uniqueSources = [];
|
|
1043
|
-
this.uniqueSourceIndexByFilename = {};
|
|
1044
|
-
}
|
|
1045
|
-
addSource(source) {
|
|
1046
|
-
if (source instanceof MagicString) return this.addSource({
|
|
1047
|
-
content: source,
|
|
1048
|
-
filename: source.filename,
|
|
1049
|
-
separator: this.separator
|
|
1050
|
-
});
|
|
1051
|
-
if (!isObject(source) || !source.content) throw new Error('bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`');
|
|
1052
|
-
[
|
|
1053
|
-
'filename',
|
|
1054
|
-
'ignoreList',
|
|
1055
|
-
'indentExclusionRanges',
|
|
1056
|
-
'separator'
|
|
1057
|
-
].forEach((option)=>{
|
|
1058
|
-
if (!hasOwnProp.call(source, option)) source[option] = source.content[option];
|
|
1059
|
-
});
|
|
1060
|
-
if (void 0 === source.separator) source.separator = this.separator;
|
|
1061
|
-
if (source.filename) if (hasOwnProp.call(this.uniqueSourceIndexByFilename, source.filename)) {
|
|
1062
|
-
const uniqueSource = this.uniqueSources[this.uniqueSourceIndexByFilename[source.filename]];
|
|
1063
|
-
if (source.content.original !== uniqueSource.content) throw new Error(`Illegal source: same filename (${source.filename}), different contents`);
|
|
1064
|
-
} else {
|
|
1065
|
-
this.uniqueSourceIndexByFilename[source.filename] = this.uniqueSources.length;
|
|
1066
|
-
this.uniqueSources.push({
|
|
1067
|
-
filename: source.filename,
|
|
1068
|
-
content: source.content.original
|
|
1069
|
-
});
|
|
1070
|
-
}
|
|
1071
|
-
this.sources.push(source);
|
|
1072
|
-
return this;
|
|
1073
|
-
}
|
|
1074
|
-
append(str, options) {
|
|
1075
|
-
this.addSource({
|
|
1076
|
-
content: new MagicString(str),
|
|
1077
|
-
separator: options && options.separator || ''
|
|
1078
|
-
});
|
|
1079
|
-
return this;
|
|
1080
|
-
}
|
|
1081
|
-
clone() {
|
|
1082
|
-
const bundle = new Bundle({
|
|
1083
|
-
intro: this.intro,
|
|
1084
|
-
separator: this.separator
|
|
1085
|
-
});
|
|
1086
|
-
this.sources.forEach((source)=>{
|
|
1087
|
-
bundle.addSource({
|
|
1088
|
-
filename: source.filename,
|
|
1089
|
-
content: source.content.clone(),
|
|
1090
|
-
separator: source.separator
|
|
1091
|
-
});
|
|
1092
|
-
});
|
|
1093
|
-
return bundle;
|
|
1094
|
-
}
|
|
1095
|
-
generateDecodedMap(options = {}) {
|
|
1096
|
-
const names = [];
|
|
1097
|
-
let x_google_ignoreList;
|
|
1098
|
-
this.sources.forEach((source)=>{
|
|
1099
|
-
Object.keys(source.content.storedNames).forEach((name)=>{
|
|
1100
|
-
if (!~names.indexOf(name)) names.push(name);
|
|
1101
|
-
});
|
|
1102
|
-
});
|
|
1103
|
-
const mappings = new Mappings(options.hires);
|
|
1104
|
-
if (this.intro) mappings.advance(this.intro);
|
|
1105
|
-
this.sources.forEach((source, i)=>{
|
|
1106
|
-
if (i > 0) mappings.advance(this.separator);
|
|
1107
|
-
const sourceIndex = source.filename ? this.uniqueSourceIndexByFilename[source.filename] : -1;
|
|
1108
|
-
const magicString = source.content;
|
|
1109
|
-
const locate = getLocator(magicString.original);
|
|
1110
|
-
if (magicString.intro) mappings.advance(magicString.intro);
|
|
1111
|
-
magicString.firstChunk.eachNext((chunk)=>{
|
|
1112
|
-
const loc = locate(chunk.start);
|
|
1113
|
-
if (chunk.intro.length) mappings.advance(chunk.intro);
|
|
1114
|
-
if (source.filename) if (chunk.edited) mappings.addEdit(sourceIndex, chunk.content, loc, chunk.storeName ? names.indexOf(chunk.original) : -1);
|
|
1115
|
-
else mappings.addUneditedChunk(sourceIndex, chunk, magicString.original, loc, magicString.sourcemapLocations);
|
|
1116
|
-
else mappings.advance(chunk.content);
|
|
1117
|
-
if (chunk.outro.length) mappings.advance(chunk.outro);
|
|
1118
|
-
});
|
|
1119
|
-
if (magicString.outro) mappings.advance(magicString.outro);
|
|
1120
|
-
if (source.ignoreList && -1 !== sourceIndex) {
|
|
1121
|
-
if (void 0 === x_google_ignoreList) x_google_ignoreList = [];
|
|
1122
|
-
x_google_ignoreList.push(sourceIndex);
|
|
1123
|
-
}
|
|
1124
|
-
});
|
|
1125
|
-
return {
|
|
1126
|
-
file: options.file ? options.file.split(/[/\\]/).pop() : void 0,
|
|
1127
|
-
sources: this.uniqueSources.map((source)=>options.file ? getRelativePath(options.file, source.filename) : source.filename),
|
|
1128
|
-
sourcesContent: this.uniqueSources.map((source)=>options.includeContent ? source.content : null),
|
|
1129
|
-
names,
|
|
1130
|
-
mappings: mappings.raw,
|
|
1131
|
-
x_google_ignoreList
|
|
1132
|
-
};
|
|
1133
|
-
}
|
|
1134
|
-
generateMap(options) {
|
|
1135
|
-
return new SourceMap(this.generateDecodedMap(options));
|
|
1136
|
-
}
|
|
1137
|
-
getIndentString() {
|
|
1138
|
-
const indentStringCounts = {};
|
|
1139
|
-
this.sources.forEach((source)=>{
|
|
1140
|
-
const indentStr = source.content._getRawIndentString();
|
|
1141
|
-
if (null === indentStr) return;
|
|
1142
|
-
if (!indentStringCounts[indentStr]) indentStringCounts[indentStr] = 0;
|
|
1143
|
-
indentStringCounts[indentStr] += 1;
|
|
1144
|
-
});
|
|
1145
|
-
return Object.keys(indentStringCounts).sort((a, b)=>indentStringCounts[a] - indentStringCounts[b])[0] || '\t';
|
|
1146
|
-
}
|
|
1147
|
-
indent(indentStr) {
|
|
1148
|
-
if (!arguments.length) indentStr = this.getIndentString();
|
|
1149
|
-
if ('' === indentStr) return this;
|
|
1150
|
-
let trailingNewline = !this.intro || '\n' === this.intro.slice(-1);
|
|
1151
|
-
this.sources.forEach((source, i)=>{
|
|
1152
|
-
const separator = void 0 !== source.separator ? source.separator : this.separator;
|
|
1153
|
-
const indentStart = trailingNewline || i > 0 && /\r?\n$/.test(separator);
|
|
1154
|
-
source.content.indent(indentStr, {
|
|
1155
|
-
exclude: source.indentExclusionRanges,
|
|
1156
|
-
indentStart
|
|
1157
|
-
});
|
|
1158
|
-
trailingNewline = '\n' === source.content.lastChar();
|
|
1159
|
-
});
|
|
1160
|
-
if (this.intro) this.intro = indentStr + this.intro.replace(/^[^\n]/gm, (match, index)=>index > 0 ? indentStr + match : match);
|
|
1161
|
-
return this;
|
|
1162
|
-
}
|
|
1163
|
-
prepend(str) {
|
|
1164
|
-
this.intro = str + this.intro;
|
|
1165
|
-
return this;
|
|
1166
|
-
}
|
|
1167
|
-
toString() {
|
|
1168
|
-
const body = this.sources.map((source, i)=>{
|
|
1169
|
-
const separator = void 0 !== source.separator ? source.separator : this.separator;
|
|
1170
|
-
const str = (i > 0 ? separator : '') + source.content.toString();
|
|
1171
|
-
return str;
|
|
1172
|
-
}).join('');
|
|
1173
|
-
return this.intro + body;
|
|
1174
|
-
}
|
|
1175
|
-
isEmpty() {
|
|
1176
|
-
if (this.intro.length && this.intro.trim()) return false;
|
|
1177
|
-
if (this.sources.some((source)=>!source.content.isEmpty())) return false;
|
|
1178
|
-
return true;
|
|
1179
|
-
}
|
|
1180
|
-
length() {
|
|
1181
|
-
return this.sources.reduce((length, source)=>length + source.content.length(), this.intro.length);
|
|
1182
|
-
}
|
|
1183
|
-
trimLines() {
|
|
1184
|
-
return this.trim('[\\r\\n]');
|
|
1185
|
-
}
|
|
1186
|
-
trim(charType) {
|
|
1187
|
-
return this.trimStart(charType).trimEnd(charType);
|
|
1188
|
-
}
|
|
1189
|
-
trimStart(charType) {
|
|
1190
|
-
const rx = new RegExp('^' + (charType || '\\s') + '+');
|
|
1191
|
-
this.intro = this.intro.replace(rx, '');
|
|
1192
|
-
if (!this.intro) {
|
|
1193
|
-
let source;
|
|
1194
|
-
let i = 0;
|
|
1195
|
-
do {
|
|
1196
|
-
source = this.sources[i++];
|
|
1197
|
-
if (!source) break;
|
|
1198
|
-
}while (!source.content.trimStartAborted(charType))
|
|
1199
|
-
}
|
|
1200
|
-
return this;
|
|
1201
|
-
}
|
|
1202
|
-
trimEnd(charType) {
|
|
1203
|
-
const rx = new RegExp((charType || '\\s') + '+$');
|
|
1204
|
-
let source;
|
|
1205
|
-
let i = this.sources.length - 1;
|
|
1206
|
-
do {
|
|
1207
|
-
source = this.sources[i--];
|
|
1208
|
-
if (!source) {
|
|
1209
|
-
this.intro = this.intro.replace(rx, '');
|
|
1210
|
-
break;
|
|
1211
|
-
}
|
|
1212
|
-
}while (!source.content.trimEndAborted(charType))
|
|
1213
|
-
return this;
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
export { magic_string_es_namespaceObject };
|
|
1029
|
+
Object.prototype.hasOwnProperty;
|
|
1030
|
+
export default MagicString;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! LICENSE: 2~snapshot.js.LICENSE.txt */
|
|
2
|
-
import { __webpack_require__ } from "./
|
|
2
|
+
import { __webpack_require__ } from "./723.js";
|
|
3
3
|
import { dist_format, dist_plugins, getTaskNameWithPrefix, subsetEquality, pathe_M_eThtNZ_resolve, dist_equals, iterableEquality } from "./723.js";
|
|
4
4
|
var snapshot_namespaceObject = {};
|
|
5
5
|
__webpack_require__.r(snapshot_namespaceObject);
|
|
@@ -1260,7 +1260,7 @@ function offsetToLineNumber(source, offset) {
|
|
|
1260
1260
|
return line + 1;
|
|
1261
1261
|
}
|
|
1262
1262
|
async function saveInlineSnapshots(environment, snapshots) {
|
|
1263
|
-
const MagicString = (await import("./2~magic-string.es.js")
|
|
1263
|
+
const MagicString = (await import("./2~magic-string.es.js")).default;
|
|
1264
1264
|
const files = new Set(snapshots.map((i)=>i.file));
|
|
1265
1265
|
await Promise.all(Array.from(files).map(async (file)=>{
|
|
1266
1266
|
const snaps = snapshots.filter((i)=>i.file === file);
|
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
/*! LICENSE: 723.js.LICENSE.txt */
|
|
2
|
-
|
|
2
|
+
var __webpack_modules__ = {};
|
|
3
|
+
var __webpack_module_cache__ = {};
|
|
4
|
+
function __webpack_require__(moduleId) {
|
|
5
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
6
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
7
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
8
|
+
exports: {}
|
|
9
|
+
};
|
|
10
|
+
__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
11
|
+
return module.exports;
|
|
12
|
+
}
|
|
13
|
+
__webpack_require__.m = __webpack_modules__;
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.d = (exports, definition)=>{
|
|
16
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: definition[key]
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
})();
|
|
22
|
+
(()=>{
|
|
23
|
+
__webpack_require__.add = function registerModules(modules) {
|
|
24
|
+
Object.assign(__webpack_require__.m, modules);
|
|
25
|
+
};
|
|
26
|
+
})();
|
|
27
|
+
var __webpack_require__temp = __webpack_require__;
|
|
28
|
+
(()=>{
|
|
29
|
+
__webpack_require__.g = (()=>{
|
|
30
|
+
if ('object' == typeof globalThis) return globalThis;
|
|
31
|
+
try {
|
|
32
|
+
return this || new Function('return this')();
|
|
33
|
+
} catch (e) {
|
|
34
|
+
if ('object' == typeof window) return window;
|
|
35
|
+
}
|
|
36
|
+
})();
|
|
37
|
+
})();
|
|
38
|
+
(()=>{
|
|
39
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
40
|
+
})();
|
|
41
|
+
(()=>{
|
|
42
|
+
__webpack_require__.r = (exports)=>{
|
|
43
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
|
|
44
|
+
value: 'Module'
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, '__esModule', {
|
|
47
|
+
value: true
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
})();
|
|
51
|
+
(()=>{
|
|
52
|
+
var installedChunks = {
|
|
53
|
+
410: 0,
|
|
54
|
+
723: 0
|
|
55
|
+
};
|
|
56
|
+
var installChunk = (data)=>{
|
|
57
|
+
var __rspack_esm_ids = data.__rspack_esm_ids;
|
|
58
|
+
var __webpack_modules__ = data.__webpack_modules__;
|
|
59
|
+
var __rspack_esm_runtime = data.__rspack_esm_runtime;
|
|
60
|
+
var moduleId, chunkId, i = 0;
|
|
61
|
+
for(moduleId in __webpack_modules__)if (__webpack_require__.o(__webpack_modules__, moduleId)) __webpack_require__.m[moduleId] = __webpack_modules__[moduleId];
|
|
62
|
+
if (__rspack_esm_runtime) __rspack_esm_runtime(__webpack_require__);
|
|
63
|
+
for(; i < __rspack_esm_ids.length; i++){
|
|
64
|
+
chunkId = __rspack_esm_ids[i];
|
|
65
|
+
if (__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) installedChunks[chunkId][0]();
|
|
66
|
+
installedChunks[__rspack_esm_ids[i]] = 0;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
__webpack_require__.C = installChunk;
|
|
70
|
+
})();
|
|
3
71
|
__webpack_require__.add({
|
|
4
72
|
"../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js" (__unused_rspack_module, exports) {
|
|
5
73
|
exports.byteLength = byteLength;
|
|
@@ -99,11 +167,9 @@ __webpack_require__.add({
|
|
|
99
167
|
*/ var base64 = __webpack_require__("../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js");
|
|
100
168
|
var ieee754 = __webpack_require__("../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js");
|
|
101
169
|
var customInspectSymbol = 'function' == typeof Symbol && 'function' == typeof Symbol['for'] ? Symbol['for']('nodejs.util.inspect.custom') : null;
|
|
102
|
-
exports.
|
|
103
|
-
exports.
|
|
104
|
-
exports.INSPECT_MAX_BYTES = 50;
|
|
170
|
+
exports.hp = Buffer;
|
|
171
|
+
exports.IS = 50;
|
|
105
172
|
var K_MAX_LENGTH = 0x7fffffff;
|
|
106
|
-
exports.kMaxLength = K_MAX_LENGTH;
|
|
107
173
|
Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport();
|
|
108
174
|
if (!Buffer.TYPED_ARRAY_SUPPORT && "u" > typeof console && 'function' == typeof console.error) console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
|
|
109
175
|
function typedArraySupport() {
|
|
@@ -239,10 +305,6 @@ __webpack_require__.add({
|
|
|
239
305
|
if (length >= K_MAX_LENGTH) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + ' bytes');
|
|
240
306
|
return 0 | length;
|
|
241
307
|
}
|
|
242
|
-
function SlowBuffer(length) {
|
|
243
|
-
if (+length != length) length = 0;
|
|
244
|
-
return Buffer.alloc(+length);
|
|
245
|
-
}
|
|
246
308
|
Buffer.isBuffer = function isBuffer(b) {
|
|
247
309
|
return null != b && true === b._isBuffer && b !== Buffer.prototype;
|
|
248
310
|
};
|
|
@@ -412,7 +474,7 @@ __webpack_require__.add({
|
|
|
412
474
|
};
|
|
413
475
|
Buffer.prototype.inspect = function inspect() {
|
|
414
476
|
var str = '';
|
|
415
|
-
var max = exports.
|
|
477
|
+
var max = exports.IS;
|
|
416
478
|
str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();
|
|
417
479
|
if (this.length > max) str += ' ... ';
|
|
418
480
|
return '<Buffer ' + str + '>';
|
|
@@ -4842,7 +4904,7 @@ function inspectArray(array, options) {
|
|
|
4842
4904
|
]), options, inspectProperty);
|
|
4843
4905
|
return `[ ${listContents}${propertyContents ? `, ${propertyContents}` : ''} ]`;
|
|
4844
4906
|
}
|
|
4845
|
-
var Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["
|
|
4907
|
+
var Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["hp"];
|
|
4846
4908
|
const getArrayName = (array)=>{
|
|
4847
4909
|
if ('function' == typeof Buffer && array instanceof Buffer) return 'Buffer';
|
|
4848
4910
|
if (array[Symbol.toStringTag]) return array[Symbol.toStringTag];
|
|
@@ -6761,7 +6823,7 @@ new Set();
|
|
|
6761
6823
|
function dist_isMockFunction(fn) {
|
|
6762
6824
|
return "function" == typeof fn && "_isMockFunction" in fn && fn._isMockFunction;
|
|
6763
6825
|
}
|
|
6764
|
-
var error_Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["
|
|
6826
|
+
var error_Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["hp"];
|
|
6765
6827
|
const IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
|
|
6766
6828
|
const IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
|
|
6767
6829
|
function isImmutable(v) {
|
|
@@ -6861,7 +6923,7 @@ function processError(_err, diffOptions, seen = new WeakSet()) {
|
|
|
6861
6923
|
return serializeValue(new Error(`Failed to fully serialize error: ${null == e ? void 0 : e.message}\nInner error message: ${null == err ? void 0 : err.message}`));
|
|
6862
6924
|
}
|
|
6863
6925
|
}
|
|
6864
|
-
var chai_Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["
|
|
6926
|
+
var chai_Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["hp"];
|
|
6865
6927
|
var __defProp = Object.defineProperty;
|
|
6866
6928
|
var __name = (target, value)=>__defProp(target, "name", {
|
|
6867
6929
|
value,
|
|
@@ -11890,7 +11952,7 @@ const castArray = (arr)=>{
|
|
|
11890
11952
|
const getTaskNames = (test)=>(test.parentNames || []).concat(test.name).filter(Boolean);
|
|
11891
11953
|
const getTaskNameWithPrefix = (test, delimiter = TEST_DELIMITER)=>getTaskNames(test).join(delimiter ? ` ${delimiter} ` : ' ');
|
|
11892
11954
|
void 0 !== helper_process && helper_process.versions?.deno;
|
|
11893
|
-
var node_modules_chai_Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["
|
|
11955
|
+
var node_modules_chai_Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["hp"];
|
|
11894
11956
|
var chai_defProp = Object.defineProperty;
|
|
11895
11957
|
var __defNormalProp = (obj, key, value)=>key in obj ? chai_defProp(obj, key, {
|
|
11896
11958
|
enumerable: true,
|
|
@@ -17211,4 +17273,4 @@ const public_rstest = wrapRstestUtilitiesAPI('rstest');
|
|
|
17211
17273
|
const rs = wrapRstestUtilitiesAPI('rs');
|
|
17212
17274
|
const onTestFinished = wrapRstestAPI('onTestFinished');
|
|
17213
17275
|
const onTestFailed = wrapRstestAPI('onTestFailed');
|
|
17214
|
-
export { afterAll, afterEach, beforeAll, beforeEach, createRstestRuntime, diff_namespaceObject, dist_equals, dist_format, dist_namespaceObject, dist_plugins, getTaskNameWithPrefix, globalApis, iterableEquality, onTestFailed, onTestFinished, pathe_M_eThtNZ_resolve, public_assert as assert, public_describe as describe, public_expect as expect, public_it as it, public_rstest as rstest, public_test as test, rs, setRealTimers, subsetEquality };
|
|
17276
|
+
export { __webpack_require__temp as __webpack_require__, afterAll, afterEach, beforeAll, beforeEach, createRstestRuntime, diff_namespaceObject, dist_equals, dist_format, dist_namespaceObject, dist_plugins, getTaskNameWithPrefix, globalApis, iterableEquality, onTestFailed, onTestFinished, pathe_M_eThtNZ_resolve, public_assert as assert, public_describe as describe, public_expect as expect, public_it as it, public_rstest as rstest, public_test as test, rs, setRealTimers, subsetEquality };
|
|
@@ -356,14 +356,16 @@ declare type BrowserViewport = {
|
|
|
356
356
|
height: number;
|
|
357
357
|
} | DevicePreset;
|
|
358
358
|
|
|
359
|
-
declare type BuiltInReporterNames = 'default' | 'verbose' | 'md' | 'github-actions' | 'junit' | 'blob';
|
|
359
|
+
declare type BuiltInReporterNames = 'default' | 'dot' | 'verbose' | 'md' | 'github-actions' | 'junit' | 'json' | 'blob';
|
|
360
360
|
|
|
361
361
|
declare type BuiltinReporterOptions = {
|
|
362
362
|
default: DefaultReporterOptions;
|
|
363
|
+
dot: Pick<DefaultReporterOptions, 'logger' | 'summary'>;
|
|
363
364
|
verbose: VerboseReporterOptions;
|
|
364
365
|
md: MdReporterOptions;
|
|
365
366
|
'github-actions': Record<string, unknown>;
|
|
366
367
|
junit: Record<string, unknown>;
|
|
368
|
+
json: JsonReporterOptions;
|
|
367
369
|
blob: BlobReporterOptions;
|
|
368
370
|
};
|
|
369
371
|
|
|
@@ -421,6 +423,18 @@ declare interface Config {
|
|
|
421
423
|
spacingOuter: string;
|
|
422
424
|
}
|
|
423
425
|
|
|
426
|
+
declare type Config_2 = {
|
|
427
|
+
now?: number | Date;
|
|
428
|
+
toFake?: FakeMethod[];
|
|
429
|
+
toNotFake?: FakeMethod[];
|
|
430
|
+
loopLimit?: number;
|
|
431
|
+
shouldAdvanceTime?: boolean;
|
|
432
|
+
advanceTimeDelta?: number;
|
|
433
|
+
shouldClearNativeTimers?: boolean;
|
|
434
|
+
ignoreMissingTimers?: boolean;
|
|
435
|
+
target?: object;
|
|
436
|
+
};
|
|
437
|
+
|
|
424
438
|
declare interface Constructable {
|
|
425
439
|
new (...args: any[]): any;
|
|
426
440
|
}
|
|
@@ -522,11 +536,14 @@ declare type CoverageOptions = {
|
|
|
522
536
|
* This option accepts an array of wax(https://crates.io/crates/wax)-compatible glob patterns
|
|
523
537
|
*
|
|
524
538
|
* @default ['**\/node_modules/**',
|
|
525
|
-
* '**\/dist/**',
|
|
526
539
|
* '**\/test/**',
|
|
527
540
|
* '**\/__tests__/**',
|
|
528
|
-
* '
|
|
529
|
-
* '
|
|
541
|
+
* '**\/__mocks__/**',
|
|
542
|
+
* '**\/*.d.ts',
|
|
543
|
+
* '**\/*.{test,spec}.[jt]s',
|
|
544
|
+
* '**\/*.{test,spec}.[cm][jt]s',
|
|
545
|
+
* '**\/*.{test,spec}.[jt]sx',
|
|
546
|
+
* '**\/*.{test,spec}.[cm][jt]sx'
|
|
530
547
|
* ]
|
|
531
548
|
*/
|
|
532
549
|
exclude?: string[];
|
|
@@ -838,61 +855,7 @@ declare type ExtendConfig = Omit<LooseRstestConfig, 'projects'>;
|
|
|
838
855
|
|
|
839
856
|
declare type ExtendConfigFn = (userConfig: Readonly<LooseRstestConfig>) => MaybePromise<ExtendConfig>;
|
|
840
857
|
|
|
841
|
-
|
|
842
|
-
* Names of clock methods that may be faked by install.
|
|
843
|
-
*/
|
|
844
|
-
declare type FakeMethod =
|
|
845
|
-
| "setTimeout"
|
|
846
|
-
| "clearTimeout"
|
|
847
|
-
| "setImmediate"
|
|
848
|
-
| "clearImmediate"
|
|
849
|
-
| "setInterval"
|
|
850
|
-
| "clearInterval"
|
|
851
|
-
| "Date"
|
|
852
|
-
| "nextTick"
|
|
853
|
-
| "hrtime"
|
|
854
|
-
| "requestAnimationFrame"
|
|
855
|
-
| "cancelAnimationFrame"
|
|
856
|
-
| "requestIdleCallback"
|
|
857
|
-
| "cancelIdleCallback"
|
|
858
|
-
| "performance"
|
|
859
|
-
| "queueMicrotask";
|
|
860
|
-
|
|
861
|
-
declare interface FakeTimerInstallOpts {
|
|
862
|
-
/**
|
|
863
|
-
* Installs fake timers with the specified unix epoch (default: 0)
|
|
864
|
-
*/
|
|
865
|
-
now?: number | Date | undefined;
|
|
866
|
-
|
|
867
|
-
/**
|
|
868
|
-
* An array with names of global methods and APIs to fake. By default, `@sinonjs/fake-timers` does not replace `nextTick()` and `queueMicrotask()`.
|
|
869
|
-
* For instance, `FakeTimers.install({ toFake: ['setTimeout', 'nextTick'] })` will fake only `setTimeout()` and `nextTick()`
|
|
870
|
-
*/
|
|
871
|
-
toFake?: FakeMethod[] | undefined;
|
|
872
|
-
|
|
873
|
-
/**
|
|
874
|
-
* The maximum number of timers that will be run when calling runAll() (default: 1000)
|
|
875
|
-
*/
|
|
876
|
-
loopLimit?: number | undefined;
|
|
877
|
-
|
|
878
|
-
/**
|
|
879
|
-
* Tells @sinonjs/fake-timers to increment mocked time automatically based on the real system time shift (e.g. the mocked time will be incremented by
|
|
880
|
-
* 20ms for every 20ms change in the real system time) (default: false)
|
|
881
|
-
*/
|
|
882
|
-
shouldAdvanceTime?: boolean | undefined;
|
|
883
|
-
|
|
884
|
-
/**
|
|
885
|
-
* Relevant only when using with shouldAdvanceTime: true. increment mocked time by advanceTimeDelta ms every advanceTimeDelta ms change
|
|
886
|
-
* in the real system time (default: 20)
|
|
887
|
-
*/
|
|
888
|
-
advanceTimeDelta?: number | undefined;
|
|
889
|
-
|
|
890
|
-
/**
|
|
891
|
-
* Tells FakeTimers to clear 'native' (i.e. not fake) timers by delegating to their respective handlers. These are not cleared by
|
|
892
|
-
* default, leading to potentially unexpected behavior if timers existed prior to installing FakeTimers. (default: false)
|
|
893
|
-
*/
|
|
894
|
-
shouldClearNativeTimers?: boolean | undefined;
|
|
895
|
-
}
|
|
858
|
+
declare type FakeMethod = "setTimeout" | "clearTimeout" | "setImmediate" | "clearImmediate" | "setInterval" | "clearInterval" | "Date" | "nextTick" | "hrtime" | "requestAnimationFrame" | "cancelAnimationFrame" | "requestIdleCallback" | "cancelIdleCallback" | "performance" | "queueMicrotask";
|
|
896
859
|
|
|
897
860
|
declare class FileCoverage implements FileCoverageData {
|
|
898
861
|
constructor(data: string | FileCoverage | FileCoverageData);
|
|
@@ -1432,6 +1395,13 @@ declare interface JestAssertion<T = any> extends jest.Matchers<void, T>, CustomM
|
|
|
1432
1395
|
|
|
1433
1396
|
declare type JsonOptions = FileOptions;
|
|
1434
1397
|
|
|
1398
|
+
declare type JsonReporterOptions = {
|
|
1399
|
+
/**
|
|
1400
|
+
* Write report JSON to a file instead of stdout.
|
|
1401
|
+
*/
|
|
1402
|
+
outputPath?: string;
|
|
1403
|
+
};
|
|
1404
|
+
|
|
1435
1405
|
declare type JsonSummaryOptions = FileOptions;
|
|
1436
1406
|
|
|
1437
1407
|
declare interface LcovOnlyOptions extends FileOptions, ProjectOptions {}
|
|
@@ -2338,7 +2308,7 @@ declare interface RstestConfig {
|
|
|
2338
2308
|
*/
|
|
2339
2309
|
includeTaskLocation?: boolean;
|
|
2340
2310
|
plugins?: RsbuildConfig['plugins'];
|
|
2341
|
-
source?: Pick<NonNullable<RsbuildConfig['source']>, 'define' | 'tsconfigPath' | 'decorators' | 'include' | 'exclude'>;
|
|
2311
|
+
source?: Pick<NonNullable<RsbuildConfig['source']>, 'assetsInclude' | 'define' | 'tsconfigPath' | 'decorators' | 'include' | 'exclude' | 'transformImport' | 'assetsInclude'>;
|
|
2342
2312
|
dev?: Pick<NonNullable<RsbuildConfig['dev']>, 'writeToDisk'>;
|
|
2343
2313
|
output?: RstestOutputConfig;
|
|
2344
2314
|
resolve?: RsbuildConfig['resolve'];
|
|
@@ -2385,7 +2355,7 @@ declare type RstestContext = {
|
|
|
2385
2355
|
|
|
2386
2356
|
declare type RstestExpect = ExpectStatic;
|
|
2387
2357
|
|
|
2388
|
-
declare type RstestOutputConfig = Pick<NonNullable<RsbuildConfig['output']>, 'cssModules' | 'externals' | 'cleanDistPath' | 'module'> & {
|
|
2358
|
+
declare type RstestOutputConfig = Pick<NonNullable<RsbuildConfig['output']>, 'cssModules' | 'emitAssets' | 'externals' | 'cleanDistPath' | 'module'> & {
|
|
2389
2359
|
distPath?: string | {
|
|
2390
2360
|
root?: string;
|
|
2391
2361
|
};
|
|
@@ -2618,7 +2588,7 @@ declare interface RstestUtilities {
|
|
|
2618
2588
|
/**
|
|
2619
2589
|
* Mocks timers using `@sinonjs/fake-timers`.
|
|
2620
2590
|
*/
|
|
2621
|
-
useFakeTimers: (config?:
|
|
2591
|
+
useFakeTimers: (config?: Config_2) => RstestUtilities;
|
|
2622
2592
|
useRealTimers: () => RstestUtilities;
|
|
2623
2593
|
isFakeTimers: () => boolean;
|
|
2624
2594
|
/**
|