vest 6.0.0 → 6.0.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/exports/SuiteSerializer.cjs +45 -1
- package/dist/exports/SuiteSerializer.cjs.map +1 -1
- package/dist/exports/SuiteSerializer.mjs +45 -1
- package/dist/exports/SuiteSerializer.mjs.map +1 -1
- package/dist/exports/classnames.cjs +2 -2
- package/dist/exports/classnames.mjs +2 -2
- package/dist/exports/debounce.cjs +1 -1
- package/dist/exports/debounce.mjs +1 -1
- package/dist/exports/memo.cjs +1 -1
- package/dist/exports/memo.mjs +1 -1
- package/dist/exports/parser.cjs +2 -2
- package/dist/exports/parser.mjs +2 -2
- package/dist/{parser-CLhCAAYG.cjs → parser-DurNd9af.cjs} +2 -2
- package/dist/{parser-CLhCAAYG.cjs.map → parser-DurNd9af.cjs.map} +1 -1
- package/dist/{parser-Ch9qn6Hm.mjs → parser-TvzEAVLQ.mjs} +2 -2
- package/dist/{parser-Ch9qn6Hm.mjs.map → parser-TvzEAVLQ.mjs.map} +1 -1
- package/dist/{vest-CKYaivPf.cjs → vest-Lg6ZJuyu.cjs} +46 -12
- package/dist/vest-Lg6ZJuyu.cjs.map +1 -0
- package/dist/{vest-BEj6iXsK.mjs → vest-WSPRosdH.mjs} +47 -13
- package/dist/vest-WSPRosdH.mjs.map +1 -0
- package/dist/vest.cjs +1 -1
- package/dist/vest.mjs +1 -1
- package/package.json +6 -6
- package/src/core/Runtime.ts +3 -2
- package/src/exports/SuiteSerializer.ts +104 -1
- package/src/exports/__tests__/SuiteSerializer.test.ts +58 -1
- package/src/exports/__tests__/classnames.test.ts +24 -1
- package/src/exports/__tests__/parser.test.ts +23 -1
- package/src/suite/SuiteTypes.ts +15 -5
- package/src/suite/__tests__/runSummary.integration.test.ts +72 -0
- package/src/suite/__tests__/schema.types.test.ts +12 -0
- package/src/suite/useCreateSuiteRunner.ts +62 -41
- package/src/suiteResult/SuiteResultTypes.ts +22 -4
- package/src/suiteResult/selectors/useProduceSuiteSummary.ts +3 -2
- package/src/suiteResult/suiteResult.ts +37 -10
- package/types/{IsolateSuite-DnMtFHBW.d.cts → IsolateSuite-3gZF4eDG.d.mts} +11 -6
- package/types/IsolateSuite-3gZF4eDG.d.mts.map +1 -0
- package/types/{IsolateSuite-JdFYn2DA.d.mts → IsolateSuite-WsmXGGR-.d.cts} +11 -6
- package/types/IsolateSuite-WsmXGGR-.d.cts.map +1 -0
- package/types/{SuiteTypes-DESBCvZ7.d.cts → SuiteTypes-BNCL13HG.d.cts} +8 -7
- package/types/SuiteTypes-BNCL13HG.d.cts.map +1 -0
- package/types/{SuiteTypes-cjI5BA_k.d.mts → SuiteTypes-hg7F7swJ.d.mts} +8 -7
- package/types/SuiteTypes-hg7F7swJ.d.mts.map +1 -0
- package/types/exports/SuiteSerializer.d.cts +2 -2
- package/types/exports/SuiteSerializer.d.mts +2 -2
- package/types/exports/classnames.d.cts +2 -2
- package/types/exports/classnames.d.mts +2 -2
- package/types/exports/debounce.d.cts +1 -1
- package/types/exports/debounce.d.mts +1 -1
- package/types/exports/memo.d.cts +1 -1
- package/types/exports/memo.d.mts +1 -1
- package/types/exports/parser.d.cts +2 -2
- package/types/exports/parser.d.mts +2 -2
- package/types/{parser-BsrjuZ4_.d.cts → parser-DqW8l1IB.d.cts} +2 -2
- package/types/{parser-BsrjuZ4_.d.cts.map → parser-DqW8l1IB.d.cts.map} +1 -1
- package/types/{parser-CqvCfNJR.d.mts → parser-uCTQIcV6.d.mts} +2 -2
- package/types/{parser-CqvCfNJR.d.mts.map → parser-uCTQIcV6.d.mts.map} +1 -1
- package/types/vest.d.cts +2 -2
- package/types/vest.d.mts +2 -2
- package/types/vest.d.ts +2 -2
- package/dist/vest-BEj6iXsK.mjs.map +0 -1
- package/dist/vest-CKYaivPf.cjs.map +0 -1
- package/types/IsolateSuite-DnMtFHBW.d.cts.map +0 -1
- package/types/IsolateSuite-JdFYn2DA.d.mts.map +0 -1
- package/types/SuiteTypes-DESBCvZ7.d.cts.map +0 -1
- package/types/SuiteTypes-cjI5BA_k.d.mts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as TestAction, r as TestStatus, t as IsolateTestStateMachine } from "./IsolateTestStateMachine-BejZsTRI.mjs";
|
|
2
2
|
import { enforce, enforce as enforce$1 } from "n4s";
|
|
3
|
-
import { asArray, assign, cache, callEach, defaultTo, deferThrow, dynamicValue, either,
|
|
3
|
+
import { asArray, assign, cache, callEach, defaultTo, deferThrow, dynamicValue, either, greaterThan, hasOwnProperty, invariant, isArray, isEmpty, isFunction, isNotEmptySet, isNotNullish, isObject, isPositive, isPromise, isStringValue, isUndefined, makeBrand, makeResult, seq, text, tinyState, withCatch, withResolvers } from "vest-utils";
|
|
4
4
|
import { Bus, FocusModes, FocusSelectors, Isolate, IsolateFocused, IsolateInspector, IsolateMutator, IsolateRegistry, IsolateReorderable, IsolateSelectors, Reconciler, VestRuntime, Walker } from "vestjs-runtime";
|
|
5
5
|
import { createCascade } from "context";
|
|
6
6
|
|
|
@@ -378,16 +378,25 @@ var SummaryBase = class {
|
|
|
378
378
|
}
|
|
379
379
|
};
|
|
380
380
|
var SuiteSummary = class extends SummaryBase {
|
|
381
|
-
|
|
382
|
-
|
|
381
|
+
static {
|
|
382
|
+
_Severity$ERRORS = Severity.ERRORS, _Severity$WARNINGS = Severity.WARNINGS;
|
|
383
|
+
}
|
|
384
|
+
constructor() {
|
|
385
|
+
super();
|
|
383
386
|
this[_Severity$ERRORS] = [];
|
|
384
387
|
this[_Severity$WARNINGS] = [];
|
|
385
388
|
this.groups = {};
|
|
386
389
|
this.tests = {};
|
|
387
390
|
this.valid = null;
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
+
Object.defineProperty(this, "run", {
|
|
392
|
+
configurable: true,
|
|
393
|
+
enumerable: false,
|
|
394
|
+
value: {
|
|
395
|
+
data: void 0,
|
|
396
|
+
time: /* @__PURE__ */ new Date(0)
|
|
397
|
+
},
|
|
398
|
+
writable: true
|
|
399
|
+
});
|
|
391
400
|
}
|
|
392
401
|
};
|
|
393
402
|
|
|
@@ -1229,15 +1238,28 @@ function shouldCountTestRun(testObject) {
|
|
|
1229
1238
|
|
|
1230
1239
|
//#endregion
|
|
1231
1240
|
//#region src/suiteResult/suiteResult.ts
|
|
1232
|
-
function useCreateSuiteResult(schema, outputData, inputData) {
|
|
1241
|
+
function useCreateSuiteResult(schema, outputData, inputData, runTime = /* @__PURE__ */ new Date()) {
|
|
1233
1242
|
return useSuiteResultCache(() => {
|
|
1234
|
-
|
|
1243
|
+
const summary = useProduceSuiteSummary();
|
|
1244
|
+
summary.run = {
|
|
1245
|
+
data: inputData,
|
|
1246
|
+
time: runTime
|
|
1247
|
+
};
|
|
1248
|
+
const result = assign(constructSuiteResultObject(summary, outputData), {
|
|
1235
1249
|
dump: VestRuntime.persist(VestRuntime.useAvailableRoot),
|
|
1236
1250
|
types: schema ? {
|
|
1237
1251
|
input: inputData,
|
|
1238
1252
|
output: outputData
|
|
1239
1253
|
} : void 0
|
|
1240
1254
|
});
|
|
1255
|
+
const runMeta = Object.freeze({ ...summary.run });
|
|
1256
|
+
Object.defineProperty(result, "run", {
|
|
1257
|
+
configurable: true,
|
|
1258
|
+
enumerable: false,
|
|
1259
|
+
value: runMeta,
|
|
1260
|
+
writable: true
|
|
1261
|
+
});
|
|
1262
|
+
return Object.freeze(result);
|
|
1241
1263
|
});
|
|
1242
1264
|
}
|
|
1243
1265
|
function constructSuiteResultObject(summary, outputData) {
|
|
@@ -2167,21 +2189,23 @@ function getTypedMethods() {
|
|
|
2167
2189
|
function useCreateSuiteRunner(suiteCallback, modifiers, schema) {
|
|
2168
2190
|
const transformedModifiers = useTransformedModifiers(modifiers);
|
|
2169
2191
|
return function runSuite(...args) {
|
|
2192
|
+
const runTime = /* @__PURE__ */ new Date();
|
|
2170
2193
|
const { resolve, promise } = withResolvers();
|
|
2171
2194
|
const schemaInput = args[0];
|
|
2172
2195
|
const schemaRunResult = shouldRunSchema(schema, transformedModifiers) ? runSchemaWithParse(schema, schemaInput) : void 0;
|
|
2173
2196
|
const callbackInput = getCallbackInput(schemaRunResult, schemaInput);
|
|
2174
2197
|
const callbackArgs = [callbackInput, ...args.slice(1)];
|
|
2175
|
-
|
|
2198
|
+
const runData = callbackInput;
|
|
2199
|
+
const result = assign(promise, SuiteContext.run({
|
|
2176
2200
|
suiteParams: callbackArgs,
|
|
2177
2201
|
schema,
|
|
2178
2202
|
modifiers: transformedModifiers
|
|
2179
2203
|
}, () => {
|
|
2180
2204
|
useEmit("SUITE_RUN_STARTED");
|
|
2181
2205
|
const useResolver = () => {
|
|
2182
|
-
const result = useCreateSuiteResult(schema, callbackInput,
|
|
2183
|
-
if (!result.isPending()) resolve(result);
|
|
2184
|
-
return result;
|
|
2206
|
+
const result$1 = useCreateSuiteResult(schema, callbackInput, runData, runTime);
|
|
2207
|
+
if (!result$1.isPending()) resolve(result$1);
|
|
2208
|
+
return result$1;
|
|
2185
2209
|
};
|
|
2186
2210
|
return IsolateSuite(useRunSuiteCallback({
|
|
2187
2211
|
args: callbackArgs,
|
|
@@ -2192,6 +2216,16 @@ function useCreateSuiteRunner(suiteCallback, modifiers, schema) {
|
|
|
2192
2216
|
useResolver
|
|
2193
2217
|
}), useResolver).output;
|
|
2194
2218
|
}));
|
|
2219
|
+
Object.defineProperty(result, "run", {
|
|
2220
|
+
configurable: true,
|
|
2221
|
+
enumerable: false,
|
|
2222
|
+
value: Object.freeze({
|
|
2223
|
+
data: runData,
|
|
2224
|
+
time: runTime
|
|
2225
|
+
}),
|
|
2226
|
+
writable: true
|
|
2227
|
+
});
|
|
2228
|
+
return result;
|
|
2195
2229
|
};
|
|
2196
2230
|
}
|
|
2197
2231
|
/**
|
|
@@ -2493,4 +2527,4 @@ function createSuite(suiteCallback, schema) {
|
|
|
2493
2527
|
|
|
2494
2528
|
//#endregion
|
|
2495
2529
|
export { ErrorStrings as S, suiteSelectors as _, warn as a, SuiteContext as b, only as c, getTestFromAbortSignal as d, registerReconciler as f, optional as g, skipWhen as h, each as i, skip as l, mode as m, createSuite as n, useWarn as o, omitWhen as p, group as r, include as s, enforce$1 as t, test as u, VestTest as v, Modes as x, createVestIsolate as y };
|
|
2496
|
-
//# sourceMappingURL=vest-
|
|
2530
|
+
//# sourceMappingURL=vest-WSPRosdH.mjs.map
|