@rstest/core 0.2.0 → 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} +36 -33
- package/dist/{44.js → 350.js} +6 -5
- package/dist/{813.js → 607.js} +16 -15
- package/dist/{208.js → 655.js} +61 -60
- 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 +85 -85
- package/dist/worker.js +41 -39
- 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/{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: [
|
|
@@ -8174,14 +8175,14 @@ ${printReceived(actual)}`
|
|
|
8174
8175
|
for (let [r, t] of h)u[r] = e ? g(d(t[0]), d(t[1]), t[2]) : a;
|
|
8175
8176
|
return u;
|
|
8176
8177
|
}
|
|
8177
|
-
var external_node_tty_ = __webpack_require__("tty");
|
|
8178
|
+
var external_node_tty_ = __webpack_require__("node:tty");
|
|
8178
8179
|
var node_r = void 0 !== process.env.FORCE_TTY || (0, external_node_tty_.isatty)(1);
|
|
8179
8180
|
var node_u = p(node_r);
|
|
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);
|
package/dist/{359.js → 698.js}
RENAMED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
+
export const __webpack_id__ = "698";
|
|
3
4
|
export const __webpack_ids__ = [
|
|
4
|
-
"
|
|
5
|
+
"698"
|
|
5
6
|
];
|
|
6
7
|
export const __webpack_modules__ = {
|
|
7
8
|
"../../node_modules/.pnpm/stacktrace-parser@0.1.11/node_modules/stacktrace-parser/dist/stack-trace-parser.esm.js": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
8
9
|
__webpack_require__.d(__webpack_exports__, {
|
|
9
|
-
|
|
10
|
+
q: ()=>parse
|
|
10
11
|
});
|
|
11
12
|
var UNKNOWN_FUNCTION = '<unknown>';
|
|
12
13
|
function parse(stackString) {
|
|
@@ -300,7 +301,7 @@ export const __webpack_modules__ = {
|
|
|
300
301
|
const summary = [];
|
|
301
302
|
for (const module of this.runningModules){
|
|
302
303
|
const relativePath = (0, external_pathe_.relative)(this.rootPath, module);
|
|
303
|
-
summary.push(`${utils
|
|
304
|
+
summary.push(`${utils.yW.bgYellow(utils.yW.bold(' RUNS '))} ${(0, utils.EQ)(relativePath)}`);
|
|
304
305
|
}
|
|
305
306
|
summary.push('');
|
|
306
307
|
return summary;
|
|
@@ -319,52 +320,52 @@ export const __webpack_modules__ = {
|
|
|
319
320
|
}
|
|
320
321
|
}
|
|
321
322
|
const getSummaryStatusString = (tasks, name = 'tests', showTotal = true)=>{
|
|
322
|
-
if (0 === tasks.length) return utils
|
|
323
|
+
if (0 === tasks.length) return utils.yW.dim(`no ${name}`);
|
|
323
324
|
const passed = tasks.filter((result)=>'pass' === result.status);
|
|
324
325
|
const failed = tasks.filter((result)=>'fail' === result.status);
|
|
325
326
|
const skipped = tasks.filter((result)=>'skip' === result.status);
|
|
326
327
|
const todo = tasks.filter((result)=>'todo' === result.status);
|
|
327
328
|
const status = [
|
|
328
|
-
failed.length ? utils
|
|
329
|
-
passed.length ? utils
|
|
330
|
-
skipped.length ? utils
|
|
331
|
-
todo.length ? utils
|
|
329
|
+
failed.length ? utils.yW.bold(utils.yW.red(`${failed.length} failed`)) : null,
|
|
330
|
+
passed.length ? utils.yW.bold(utils.yW.green(`${passed.length} passed`)) : null,
|
|
331
|
+
skipped.length ? utils.yW.yellow(`${skipped.length} skipped`) : null,
|
|
332
|
+
todo.length ? utils.yW.gray(`${todo.length} todo`) : null
|
|
332
333
|
].filter(Boolean);
|
|
333
|
-
return status.join(utils
|
|
334
|
+
return status.join(utils.yW.dim(' | ')) + (showTotal && status.length > 1 ? utils.yW.gray(` (${tasks.length})`) : '');
|
|
334
335
|
};
|
|
335
336
|
const printSnapshotSummaryLog = (snapshots, rootDir)=>{
|
|
336
337
|
const summary = [];
|
|
337
|
-
if (snapshots.added) summary.push(utils
|
|
338
|
-
if (snapshots.unmatched) summary.push(utils
|
|
339
|
-
if (snapshots.updated) summary.push(utils
|
|
340
|
-
if (snapshots.filesRemoved) if (snapshots.didUpdate) summary.push(utils
|
|
341
|
-
else summary.push(utils
|
|
338
|
+
if (snapshots.added) summary.push(utils.yW.bold(utils.yW.green(`${snapshots.added} written`)));
|
|
339
|
+
if (snapshots.unmatched) summary.push(utils.yW.bold(utils.yW.red(`${snapshots.unmatched} failed`)));
|
|
340
|
+
if (snapshots.updated) summary.push(utils.yW.bold(utils.yW.green(`${snapshots.updated} updated `)));
|
|
341
|
+
if (snapshots.filesRemoved) if (snapshots.didUpdate) summary.push(utils.yW.bold(utils.yW.green(`${snapshots.filesRemoved} files removed `)));
|
|
342
|
+
else summary.push(utils.yW.bold(utils.yW.yellow(`${snapshots.filesRemoved} files obsolete `)));
|
|
342
343
|
const POINTER = "\u279C";
|
|
343
344
|
if (snapshots.filesRemovedList?.length) {
|
|
344
345
|
const [head, ...tail] = snapshots.filesRemovedList;
|
|
345
|
-
summary.push(`${utils
|
|
346
|
-
for (const key of tail)summary.push(` ${(0, utils.
|
|
346
|
+
summary.push(`${utils.yW.gray(POINTER)} ${(0, utils.XJ)(rootDir, head)}`);
|
|
347
|
+
for (const key of tail)summary.push(` ${(0, utils.XJ)(rootDir, key)}`);
|
|
347
348
|
}
|
|
348
349
|
if (snapshots.unchecked) {
|
|
349
|
-
if (snapshots.didUpdate) summary.push(utils
|
|
350
|
-
else summary.push(utils
|
|
350
|
+
if (snapshots.didUpdate) summary.push(utils.yW.bold(utils.yW.green(`${snapshots.unchecked} removed`)));
|
|
351
|
+
else summary.push(utils.yW.bold(utils.yW.yellow(`${snapshots.unchecked} obsolete`)));
|
|
351
352
|
for (const uncheckedFile of snapshots.uncheckedKeysByFile){
|
|
352
|
-
summary.push(`${utils
|
|
353
|
+
summary.push(`${utils.yW.gray(POINTER)} ${(0, utils.XJ)(rootDir, uncheckedFile.filePath)}`);
|
|
353
354
|
for (const key of uncheckedFile.keys)summary.push(` ${key}`);
|
|
354
355
|
}
|
|
355
356
|
}
|
|
356
357
|
for (const [index, snapshot] of summary.entries()){
|
|
357
358
|
const title = 0 === index ? 'Snapshots' : '';
|
|
358
|
-
utils.
|
|
359
|
+
utils.vF.log(`${utils.yW.gray(title.padStart(12))} ${snapshot}`);
|
|
359
360
|
}
|
|
360
361
|
};
|
|
361
362
|
const printSummaryLog = ({ results, testResults, snapshotSummary, duration, rootPath })=>{
|
|
362
|
-
utils.
|
|
363
|
+
utils.vF.log('');
|
|
363
364
|
printSnapshotSummaryLog(snapshotSummary, rootPath);
|
|
364
|
-
utils.
|
|
365
|
-
utils.
|
|
366
|
-
utils.
|
|
367
|
-
utils.
|
|
365
|
+
utils.vF.log(`${utils.yW.gray('Test Files'.padStart(11))} ${getSummaryStatusString(results)}`);
|
|
366
|
+
utils.vF.log(`${utils.yW.gray('Tests'.padStart(11))} ${getSummaryStatusString(testResults)}`);
|
|
367
|
+
utils.vF.log(`${utils.yW.gray('Duration'.padStart(11))} ${(0, utils.kV)(duration.totalTime)} ${utils.yW.gray(`(build ${(0, utils.kV)(duration.buildTime)}, tests ${(0, utils.kV)(duration.testTime)})`)}`);
|
|
368
|
+
utils.vF.log('');
|
|
368
369
|
};
|
|
369
370
|
const printSummaryErrorLogs = async ({ testResults, results, rootPath, getSourcemap })=>{
|
|
370
371
|
const failedTests = [
|
|
@@ -372,17 +373,17 @@ export const __webpack_modules__ = {
|
|
|
372
373
|
...testResults.filter((i)=>'fail' === i.status)
|
|
373
374
|
];
|
|
374
375
|
if (0 === failedTests.length) return;
|
|
375
|
-
utils.
|
|
376
|
-
utils.
|
|
377
|
-
utils.
|
|
376
|
+
utils.vF.log('');
|
|
377
|
+
utils.vF.log(utils.yW.bold('Summary of all failing tests:'));
|
|
378
|
+
utils.vF.log('');
|
|
378
379
|
for (const test of failedTests){
|
|
379
380
|
const relativePath = external_pathe_["default"].relative(rootPath, test.testPath);
|
|
380
|
-
const nameStr = (0, utils.
|
|
381
|
-
utils.
|
|
381
|
+
const nameStr = (0, utils.fN)(test);
|
|
382
|
+
utils.vF.log(`${utils.yW.bgRed(' FAIL ')} ${(0, utils.EQ)(relativePath)} ${nameStr.length ? `${utils.yW.dim(utils.vO)} ${nameStr}` : ''}`);
|
|
382
383
|
if (test.errors) {
|
|
383
384
|
const { printError } = await Promise.all([
|
|
384
|
-
__webpack_require__.e("
|
|
385
|
-
__webpack_require__.e("
|
|
385
|
+
__webpack_require__.e("829"),
|
|
386
|
+
__webpack_require__.e("704")
|
|
386
387
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/utils/error.ts"));
|
|
387
388
|
for (const error of test.errors)await printError(error, getSourcemap, rootPath);
|
|
388
389
|
}
|
|
@@ -395,27 +396,27 @@ export const __webpack_modules__ = {
|
|
|
395
396
|
skip: '-'
|
|
396
397
|
};
|
|
397
398
|
const statusColorfulStr = {
|
|
398
|
-
fail: utils
|
|
399
|
-
pass: utils
|
|
400
|
-
todo: utils
|
|
401
|
-
skip: utils
|
|
399
|
+
fail: utils.yW.red(statusStr.fail),
|
|
400
|
+
pass: utils.yW.green(statusStr.pass),
|
|
401
|
+
todo: utils.yW.gray(statusStr.todo),
|
|
402
|
+
skip: utils.yW.gray(statusStr.skip)
|
|
402
403
|
};
|
|
403
404
|
const logCase = (result, slowTestThreshold)=>{
|
|
404
405
|
const isSlowCase = (result.duration || 0) > slowTestThreshold;
|
|
405
|
-
const icon = isSlowCase && 'pass' === result.status ? utils
|
|
406
|
-
const nameStr = (0, utils.
|
|
407
|
-
const duration = void 0 !== result.duration ? ` (${(0, utils.
|
|
408
|
-
const retry = result.retryCount ? utils
|
|
409
|
-
utils.
|
|
410
|
-
if (result.errors) for (const error of result.errors)console.error(utils
|
|
406
|
+
const icon = isSlowCase && 'pass' === result.status ? utils.yW.yellow(statusStr[result.status]) : statusColorfulStr[result.status];
|
|
407
|
+
const nameStr = (0, utils.fN)(result);
|
|
408
|
+
const duration = void 0 !== result.duration ? ` (${(0, utils.kV)(result.duration)})` : '';
|
|
409
|
+
const retry = result.retryCount ? utils.yW.yellow(` (retry x${result.retryCount})`) : '';
|
|
410
|
+
utils.vF.log(` ${icon} ${nameStr}${utils.yW.gray(duration)}${retry}`);
|
|
411
|
+
if (result.errors) for (const error of result.errors)console.error(utils.yW.red(` ${error.message}`));
|
|
411
412
|
};
|
|
412
413
|
const logFileTitle = (test, relativePath, slowTestThreshold, alwaysShowTime = false)=>{
|
|
413
|
-
let title = ` ${utils
|
|
414
|
-
const formatDuration = (duration)=>utils
|
|
415
|
-
title += ` ${utils
|
|
414
|
+
let title = ` ${utils.yW.bold(statusColorfulStr[test.status])} ${(0, utils.EQ)(relativePath)}`;
|
|
415
|
+
const formatDuration = (duration)=>utils.yW[duration > slowTestThreshold ? 'yellow' : 'green']((0, utils.kV)(duration));
|
|
416
|
+
title += ` ${utils.yW.gray(`(${test.results.length})`)}`;
|
|
416
417
|
const isTooSlow = test.duration && test.duration > slowTestThreshold;
|
|
417
418
|
if (alwaysShowTime || isTooSlow) title += ` ${formatDuration(test.duration)}`;
|
|
418
|
-
utils.
|
|
419
|
+
utils.vF.log(title);
|
|
419
420
|
};
|
|
420
421
|
class DefaultReporter {
|
|
421
422
|
rootPath;
|
|
@@ -455,14 +456,14 @@ export const __webpack_modules__ = {
|
|
|
455
456
|
];
|
|
456
457
|
const testPath = (0, external_pathe_.relative)(this.rootPath, log.testPath);
|
|
457
458
|
if (log.trace) {
|
|
458
|
-
const [frame] = (0, stack_trace_parser_esm.
|
|
459
|
+
const [frame] = (0, stack_trace_parser_esm.q)(log.trace);
|
|
459
460
|
const filePath = (0, external_pathe_.relative)(this.rootPath, frame.file || '');
|
|
460
|
-
if (filePath !== testPath) titles.push((0, utils.
|
|
461
|
-
titles.push((0, utils.
|
|
462
|
-
} else titles.push((0, utils.
|
|
463
|
-
utils.
|
|
464
|
-
utils.
|
|
465
|
-
utils.
|
|
461
|
+
if (filePath !== testPath) titles.push((0, utils.EQ)(testPath));
|
|
462
|
+
titles.push((0, utils.EQ)(filePath) + utils.yW.gray(`:${frame.lineNumber}:${frame.column}`));
|
|
463
|
+
} else titles.push((0, utils.EQ)(testPath));
|
|
464
|
+
utils.vF.log(titles.join(utils.yW.gray(' | ')));
|
|
465
|
+
utils.vF.log(log.content);
|
|
466
|
+
utils.vF.log('');
|
|
466
467
|
}
|
|
467
468
|
async onExit() {
|
|
468
469
|
this.statusRenderer?.clear();
|
|
@@ -492,6 +493,9 @@ export const __webpack_modules__ = {
|
|
|
492
493
|
this.onWritePath = options.onWritePath;
|
|
493
494
|
this.rootPath = rootPath;
|
|
494
495
|
}
|
|
496
|
+
log(message) {
|
|
497
|
+
console.log(`${message}\n`);
|
|
498
|
+
}
|
|
495
499
|
async onTestRunEnd({ results, testResults, getSourcemap }) {
|
|
496
500
|
const failedTests = [
|
|
497
501
|
...results.filter((i)=>'fail' === i.status && i.errors?.length),
|
|
@@ -499,14 +503,15 @@ export const __webpack_modules__ = {
|
|
|
499
503
|
];
|
|
500
504
|
if (0 === failedTests.length) return;
|
|
501
505
|
const { parseErrorStacktrace } = await Promise.all([
|
|
502
|
-
__webpack_require__.e("
|
|
503
|
-
__webpack_require__.e("
|
|
506
|
+
__webpack_require__.e("829"),
|
|
507
|
+
__webpack_require__.e("704")
|
|
504
508
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/utils/error.ts"));
|
|
509
|
+
const logs = [];
|
|
505
510
|
for (const test of failedTests){
|
|
506
511
|
const { testPath } = test;
|
|
507
|
-
const nameStr = (0, utils.
|
|
512
|
+
const nameStr = (0, utils.fN)(test);
|
|
508
513
|
const shortPath = (0, external_pathe_.relative)(this.rootPath, testPath);
|
|
509
|
-
const title = `${shortPath} ${utils.
|
|
514
|
+
const title = `${shortPath} ${utils.vO} ${nameStr}`;
|
|
510
515
|
for (const error of test.errors || []){
|
|
511
516
|
let file = testPath;
|
|
512
517
|
let line = 1;
|
|
@@ -525,9 +530,12 @@ export const __webpack_modules__ = {
|
|
|
525
530
|
column = stackFrames[0].column || 1;
|
|
526
531
|
}
|
|
527
532
|
}
|
|
528
|
-
|
|
533
|
+
logs.push(`::${type} file=${this.onWritePath?.(file) || file},line=${line},col=${column},title=${escapeData(title)}::${escapeData(message)}`);
|
|
529
534
|
}
|
|
530
535
|
}
|
|
536
|
+
this.log('::group::error for github actions');
|
|
537
|
+
for (const log of logs)this.log(log);
|
|
538
|
+
this.log('::endgroup::');
|
|
531
539
|
}
|
|
532
540
|
}
|
|
533
541
|
function escapeData(s) {
|
|
@@ -549,7 +557,7 @@ export const __webpack_modules__ = {
|
|
|
549
557
|
'github-actions': GithubActionsReporter
|
|
550
558
|
};
|
|
551
559
|
function createReporters(reporters, initOptions = {}) {
|
|
552
|
-
const result = (0, helper.
|
|
560
|
+
const result = (0, helper.bg)(reporters).map((reporter)=>{
|
|
553
561
|
if ('string' == typeof reporter || Array.isArray(reporter)) {
|
|
554
562
|
const [name, options = {}] = 'string' == typeof reporter ? [
|
|
555
563
|
reporter,
|
|
@@ -570,8 +578,8 @@ export const __webpack_modules__ = {
|
|
|
570
578
|
}
|
|
571
579
|
function createContext(options, userConfig) {
|
|
572
580
|
const { cwd, command, fileFilters, configFilePath } = options;
|
|
573
|
-
const rootPath = userConfig.root ? (0, helper.
|
|
574
|
-
const rstestConfig = (0, src_config.
|
|
581
|
+
const rootPath = userConfig.root ? (0, helper.FI)(cwd, userConfig.root) : cwd;
|
|
582
|
+
const rstestConfig = (0, src_config.wX)(userConfig);
|
|
575
583
|
const reporters = 'list' !== command ? createReporters(rstestConfig.reporters, {
|
|
576
584
|
rootPath,
|
|
577
585
|
config: rstestConfig
|
|
@@ -582,7 +590,7 @@ export const __webpack_modules__ = {
|
|
|
582
590
|
return {
|
|
583
591
|
configFilePath,
|
|
584
592
|
command,
|
|
585
|
-
version: "0.2.
|
|
593
|
+
version: "0.2.2",
|
|
586
594
|
rootPath,
|
|
587
595
|
reporters,
|
|
588
596
|
fileFilters,
|
|
@@ -600,15 +608,15 @@ export const __webpack_modules__ = {
|
|
|
600
608
|
}, config);
|
|
601
609
|
const runTests = async ()=>{
|
|
602
610
|
const { runTests } = await Promise.all([
|
|
603
|
-
__webpack_require__.e("
|
|
604
|
-
__webpack_require__.e("
|
|
611
|
+
__webpack_require__.e("985"),
|
|
612
|
+
__webpack_require__.e("33")
|
|
605
613
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/core/runTests.ts"));
|
|
606
614
|
await runTests(context);
|
|
607
615
|
};
|
|
608
616
|
const listTests = async (options)=>{
|
|
609
617
|
const { listTests } = await Promise.all([
|
|
610
|
-
__webpack_require__.e("
|
|
611
|
-
__webpack_require__.e("
|
|
618
|
+
__webpack_require__.e("985"),
|
|
619
|
+
__webpack_require__.e("971")
|
|
612
620
|
]).then(__webpack_require__.bind(__webpack_require__, "./src/core/listTests.ts"));
|
|
613
621
|
await listTests(context, options);
|
|
614
622
|
};
|