vest 5.2.0 → 5.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/cjs/SuiteSerializer.development.js +45 -2
- package/dist/cjs/SuiteSerializer.development.js.map +1 -1
- package/dist/cjs/SuiteSerializer.production.js +1 -1
- package/dist/cjs/SuiteSerializer.production.js.map +1 -1
- package/dist/cjs/vest.development.js +31 -17
- package/dist/cjs/vest.development.js.map +1 -1
- package/dist/cjs/vest.production.js +1 -1
- package/dist/cjs/vest.production.js.map +1 -1
- package/dist/es/SuiteSerializer.development.js +45 -2
- package/dist/es/SuiteSerializer.development.js.map +1 -1
- package/dist/es/SuiteSerializer.production.js +1 -1
- package/dist/es/SuiteSerializer.production.js.map +1 -1
- package/dist/es/vest.development.js +32 -18
- package/dist/es/vest.development.js.map +1 -1
- package/dist/es/vest.production.js +1 -1
- package/dist/es/vest.production.js.map +1 -1
- package/dist/umd/SuiteSerializer.development.js +48 -6
- package/dist/umd/SuiteSerializer.development.js.map +1 -1
- package/dist/umd/SuiteSerializer.production.js +1 -1
- package/dist/umd/SuiteSerializer.production.js.map +1 -1
- package/dist/umd/vest.development.js +31 -17
- package/dist/umd/vest.development.js.map +1 -1
- package/dist/umd/vest.production.js +1 -1
- package/dist/umd/vest.production.js.map +1 -1
- package/package.json +6 -6
- package/types/SuiteSerializer.d.ts +1 -0
- package/types/SuiteSerializer.d.ts.map +1 -1
- package/types/classnames.d.ts +1 -0
- package/types/classnames.d.ts.map +1 -1
- package/types/parser.d.ts +1 -0
- package/types/parser.d.ts.map +1 -1
- package/types/promisify.d.ts +1 -0
- package/types/promisify.d.ts.map +1 -1
- package/types/vest.d.ts +4 -2
- package/types/vest.d.ts.map +1 -1
|
@@ -1,18 +1,61 @@
|
|
|
1
|
+
import { assign } from 'vest-utils';
|
|
1
2
|
import { IsolateSerializer } from 'vestjs-runtime';
|
|
2
3
|
|
|
3
4
|
class SuiteSerializer {
|
|
4
5
|
static serialize(suite) {
|
|
5
6
|
const dump = Object.assign(Object.assign({}, suite.dump()), { output: undefined });
|
|
6
|
-
return IsolateSerializer.serialize(dump);
|
|
7
|
+
return IsolateSerializer.serialize(dump, MiniMap);
|
|
7
8
|
}
|
|
8
9
|
static deserialize(serialized) {
|
|
9
|
-
return IsolateSerializer.deserialize(serialized);
|
|
10
|
+
return IsolateSerializer.deserialize(serialized, MiniMap);
|
|
10
11
|
}
|
|
11
12
|
static resume(suite, root) {
|
|
12
13
|
const suiteRoot = SuiteSerializer.deserialize(root);
|
|
13
14
|
suite.resume(suiteRoot);
|
|
14
15
|
}
|
|
15
16
|
}
|
|
17
|
+
const testMiniMap = {
|
|
18
|
+
asyncTest: '_at',
|
|
19
|
+
fieldName: 'fN',
|
|
20
|
+
groupName: 'gN',
|
|
21
|
+
message: 'ms',
|
|
22
|
+
severity: 'sv',
|
|
23
|
+
status: 'st',
|
|
24
|
+
testFn: '_tf', // testFn is not serialized
|
|
25
|
+
};
|
|
26
|
+
const focusMiniMap = {
|
|
27
|
+
focusMode: 'fM',
|
|
28
|
+
match: 'm',
|
|
29
|
+
matchAll: 'mA',
|
|
30
|
+
};
|
|
31
|
+
const MiniMap = {
|
|
32
|
+
keys: {
|
|
33
|
+
data: assign({}, testMiniMap, focusMiniMap),
|
|
34
|
+
},
|
|
35
|
+
values: {
|
|
36
|
+
status: {
|
|
37
|
+
CANCELED: 'C',
|
|
38
|
+
DONE: 'D',
|
|
39
|
+
FAILED: 'F',
|
|
40
|
+
INITIAL: 'I',
|
|
41
|
+
OMITTED: 'O',
|
|
42
|
+
PASSING: 'P',
|
|
43
|
+
PENDING: 'PE',
|
|
44
|
+
SKIPPED: 'S',
|
|
45
|
+
UNTESTED: 'U',
|
|
46
|
+
WARNING: 'W',
|
|
47
|
+
},
|
|
48
|
+
$type: {
|
|
49
|
+
Each: 'E',
|
|
50
|
+
Focused: 'F',
|
|
51
|
+
Group: 'G',
|
|
52
|
+
OmitWhen: 'OW',
|
|
53
|
+
SkipWhen: 'SW',
|
|
54
|
+
Suite: 'S',
|
|
55
|
+
Test: 'T',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
};
|
|
16
59
|
|
|
17
60
|
export { SuiteSerializer };
|
|
18
61
|
//# sourceMappingURL=SuiteSerializer.development.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuiteSerializer.development.js","sources":["../../src/exports/SuiteSerializer.ts"],"sourcesContent":["import { IsolateSerializer } from 'vestjs-runtime';\n\nimport { TIsolateSuite } from 'IsolateSuite';\nimport { TFieldName, TGroupName } from 'SuiteResultTypes';\nimport { Suite } from 'SuiteTypes';\n\nexport class SuiteSerializer {\n static serialize(suite: Suite<TFieldName, TGroupName>) {\n const dump = { ...suite.dump(), output: undefined };\n\n return IsolateSerializer.serialize(dump);\n }\n\n static deserialize(\n serialized: string | TIsolateSuite | Record<string, any>\n ): TIsolateSuite {\n return IsolateSerializer.deserialize(serialized) as TIsolateSuite;\n }\n\n static resume(\n suite: Suite<TFieldName, TGroupName>,\n root: string | TIsolateSuite | Record<string, any>\n ): void {\n const suiteRoot = SuiteSerializer.deserialize(root);\n\n suite.resume(suiteRoot);\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SuiteSerializer.development.js","sources":["../../src/exports/SuiteSerializer.ts"],"sourcesContent":["import { assign } from 'vest-utils';\nimport { IsolateSerializer } from 'vestjs-runtime';\n\nimport { CommonStates } from 'CommonStateMachine';\nimport { TIsolateSuite } from 'IsolateSuite';\nimport { IsolateTestPayload } from 'IsolateTest';\nimport { TestStatus } from 'IsolateTestStateMachine';\nimport { TFieldName, TGroupName } from 'SuiteResultTypes';\nimport { Suite } from 'SuiteTypes';\nimport { VestIsolateType } from 'VestIsolateType';\nimport { IsolateFocusedPayload } from 'focused';\n\nexport class SuiteSerializer {\n static serialize(suite: Suite<TFieldName, TGroupName>) {\n const dump = { ...suite.dump(), output: undefined };\n\n return IsolateSerializer.serialize(dump, MiniMap);\n }\n\n static deserialize(\n serialized: string | TIsolateSuite | Record<string, any>\n ): TIsolateSuite {\n return IsolateSerializer.deserialize(serialized, MiniMap) as TIsolateSuite;\n }\n\n static resume(\n suite: Suite<TFieldName, TGroupName>,\n root: string | TIsolateSuite | Record<string, any>\n ): void {\n const suiteRoot = SuiteSerializer.deserialize(root);\n\n suite.resume(suiteRoot);\n }\n}\n\nconst testMiniMap: Record<keyof IsolateTestPayload, string> = {\n asyncTest: '_at', // asyncTest is not serialized\n fieldName: 'fN',\n groupName: 'gN',\n message: 'ms',\n severity: 'sv',\n status: 'st',\n testFn: '_tf', // testFn is not serialized\n};\n\nconst focusMiniMap: Record<keyof IsolateFocusedPayload, string> = {\n focusMode: 'fM',\n match: 'm',\n matchAll: 'mA',\n};\n\nconst MiniMap: MiniMap = {\n keys: {\n data: assign({}, testMiniMap, focusMiniMap),\n },\n values: {\n status: {\n CANCELED: 'C',\n DONE: 'D',\n FAILED: 'F',\n INITIAL: 'I',\n OMITTED: 'O',\n PASSING: 'P',\n PENDING: 'PE',\n SKIPPED: 'S',\n UNTESTED: 'U',\n WARNING: 'W',\n },\n $type: {\n Each: 'E',\n Focused: 'F',\n Group: 'G',\n OmitWhen: 'OW',\n SkipWhen: 'SW',\n Suite: 'S',\n Test: 'T',\n },\n },\n};\n\ntype MiniMap = {\n keys: {\n data: Record<keyof IsolateTestPayload, string> &\n Record<keyof IsolateFocusedPayload, string>;\n };\n values: {\n status: Record<keyof typeof TestStatus, string> &\n Record<keyof typeof CommonStates, string>;\n $type: Record<keyof typeof VestIsolateType, string>;\n };\n};\n"],"names":[],"mappings":";;;MAYa,eAAe,CAAA;IAC1B,OAAO,SAAS,CAAC,KAAoC,EAAA;QACnD,MAAM,IAAI,GAAQ,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,KAAK,CAAC,IAAI,EAAE,CAAA,EAAA,EAAE,MAAM,EAAE,SAAS,EAAA,CAAE,CAAC;QAEpD,OAAO,iBAAiB,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACnD;IAED,OAAO,WAAW,CAChB,UAAwD,EAAA;QAExD,OAAO,iBAAiB,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAkB,CAAC;KAC5E;AAED,IAAA,OAAO,MAAM,CACX,KAAoC,EACpC,IAAkD,EAAA;QAElD,MAAM,SAAS,GAAG,eAAe,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAEpD,QAAA,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;KACzB;AACF,CAAA;AAED,MAAM,WAAW,GAA6C;AAC5D,IAAA,SAAS,EAAE,KAAK;AAChB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,KAAK;CACd,CAAC;AAEF,MAAM,YAAY,GAAgD;AAChE,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,KAAK,EAAE,GAAG;AACV,IAAA,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,MAAM,OAAO,GAAY;AACvB,IAAA,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,WAAW,EAAE,YAAY,CAAC;AAC5C,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,MAAM,EAAE;AACN,YAAA,QAAQ,EAAE,GAAG;AACb,YAAA,IAAI,EAAE,GAAG;AACT,YAAA,MAAM,EAAE,GAAG;AACX,YAAA,OAAO,EAAE,GAAG;AACZ,YAAA,OAAO,EAAE,GAAG;AACZ,YAAA,OAAO,EAAE,GAAG;AACZ,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,OAAO,EAAE,GAAG;AACZ,YAAA,QAAQ,EAAE,GAAG;AACb,YAAA,OAAO,EAAE,GAAG;AACb,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,GAAG;AACT,YAAA,OAAO,EAAE,GAAG;AACZ,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,QAAQ,EAAE,IAAI;AACd,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,IAAI,EAAE,GAAG;AACV,SAAA;AACF,KAAA;CACF;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{assign as e}from"vest-utils";import{IsolateSerializer as s}from"vestjs-runtime";class t{static serialize(e){const t=Object.assign(Object.assign({},e.dump()),{output:void 0});return s.serialize(t,i)}static deserialize(e){return s.deserialize(e,i)}static resume(e,s){const i=t.deserialize(s);e.resume(i)}}const i={keys:{data:e({},{asyncTest:"_at",fieldName:"fN",groupName:"gN",message:"ms",severity:"sv",status:"st",testFn:"_tf"},{focusMode:"fM",match:"m",matchAll:"mA"})},values:{status:{CANCELED:"C",DONE:"D",FAILED:"F",INITIAL:"I",OMITTED:"O",PASSING:"P",PENDING:"PE",SKIPPED:"S",UNTESTED:"U",WARNING:"W"},$type:{Each:"E",Focused:"F",Group:"G",OmitWhen:"OW",SkipWhen:"SW",Suite:"S",Test:"T"}}};export{t as SuiteSerializer};
|
|
2
2
|
//# sourceMappingURL=SuiteSerializer.production.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuiteSerializer.production.js","sources":["../../src/exports/SuiteSerializer.ts"],"sourcesContent":["import { IsolateSerializer } from 'vestjs-runtime';\n\nimport { TIsolateSuite } from 'IsolateSuite';\nimport { TFieldName, TGroupName } from 'SuiteResultTypes';\nimport { Suite } from 'SuiteTypes';\n\nexport class SuiteSerializer {\n static serialize(suite: Suite<TFieldName, TGroupName>) {\n const dump = { ...suite.dump(), output: undefined };\n\n return IsolateSerializer.serialize(dump);\n }\n\n static deserialize(\n serialized: string | TIsolateSuite | Record<string, any>\n ): TIsolateSuite {\n return IsolateSerializer.deserialize(serialized) as TIsolateSuite;\n }\n\n static resume(\n suite: Suite<TFieldName, TGroupName>,\n root: string | TIsolateSuite | Record<string, any>\n ): void {\n const suiteRoot = SuiteSerializer.deserialize(root);\n\n suite.resume(suiteRoot);\n }\n}\n"],"names":["SuiteSerializer","static","suite","dump","Object","assign","output","undefined","IsolateSerializer","serialize","serialized","deserialize","root","suiteRoot","resume"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SuiteSerializer.production.js","sources":["../../src/exports/SuiteSerializer.ts"],"sourcesContent":["import { assign } from 'vest-utils';\nimport { IsolateSerializer } from 'vestjs-runtime';\n\nimport { CommonStates } from 'CommonStateMachine';\nimport { TIsolateSuite } from 'IsolateSuite';\nimport { IsolateTestPayload } from 'IsolateTest';\nimport { TestStatus } from 'IsolateTestStateMachine';\nimport { TFieldName, TGroupName } from 'SuiteResultTypes';\nimport { Suite } from 'SuiteTypes';\nimport { VestIsolateType } from 'VestIsolateType';\nimport { IsolateFocusedPayload } from 'focused';\n\nexport class SuiteSerializer {\n static serialize(suite: Suite<TFieldName, TGroupName>) {\n const dump = { ...suite.dump(), output: undefined };\n\n return IsolateSerializer.serialize(dump, MiniMap);\n }\n\n static deserialize(\n serialized: string | TIsolateSuite | Record<string, any>\n ): TIsolateSuite {\n return IsolateSerializer.deserialize(serialized, MiniMap) as TIsolateSuite;\n }\n\n static resume(\n suite: Suite<TFieldName, TGroupName>,\n root: string | TIsolateSuite | Record<string, any>\n ): void {\n const suiteRoot = SuiteSerializer.deserialize(root);\n\n suite.resume(suiteRoot);\n }\n}\n\nconst testMiniMap: Record<keyof IsolateTestPayload, string> = {\n asyncTest: '_at', // asyncTest is not serialized\n fieldName: 'fN',\n groupName: 'gN',\n message: 'ms',\n severity: 'sv',\n status: 'st',\n testFn: '_tf', // testFn is not serialized\n};\n\nconst focusMiniMap: Record<keyof IsolateFocusedPayload, string> = {\n focusMode: 'fM',\n match: 'm',\n matchAll: 'mA',\n};\n\nconst MiniMap: MiniMap = {\n keys: {\n data: assign({}, testMiniMap, focusMiniMap),\n },\n values: {\n status: {\n CANCELED: 'C',\n DONE: 'D',\n FAILED: 'F',\n INITIAL: 'I',\n OMITTED: 'O',\n PASSING: 'P',\n PENDING: 'PE',\n SKIPPED: 'S',\n UNTESTED: 'U',\n WARNING: 'W',\n },\n $type: {\n Each: 'E',\n Focused: 'F',\n Group: 'G',\n OmitWhen: 'OW',\n SkipWhen: 'SW',\n Suite: 'S',\n Test: 'T',\n },\n },\n};\n\ntype MiniMap = {\n keys: {\n data: Record<keyof IsolateTestPayload, string> &\n Record<keyof IsolateFocusedPayload, string>;\n };\n values: {\n status: Record<keyof typeof TestStatus, string> &\n Record<keyof typeof CommonStates, string>;\n $type: Record<keyof typeof VestIsolateType, string>;\n };\n};\n"],"names":["SuiteSerializer","static","suite","dump","Object","assign","output","undefined","IsolateSerializer","serialize","MiniMap","serialized","deserialize","root","suiteRoot","resume","keys","data","asyncTest","fieldName","groupName","message","severity","status","testFn","focusMode","match","matchAll","values","CANCELED","DONE","FAILED","INITIAL","OMITTED","PASSING","PENDING","SKIPPED","UNTESTED","WARNING","$type","Each","Focused","Group","OmitWhen","SkipWhen","Suite","Test"],"mappings":"6FAYaA,EACXC,iBAAiBC,GACf,MAAMC,EAAYC,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAAAH,EAAMC,QAAM,CAAEG,YAAQC,IAExC,OAAOC,EAAkBC,UAAUN,EAAMO,EAC1C,CAEDT,mBACEU,GAEA,OAAOH,EAAkBI,YAAYD,EAAYD,EAClD,CAEDT,cACEC,EACAW,GAEA,MAAMC,EAAYd,EAAgBY,YAAYC,GAE9CX,EAAMa,OAAOD,EACd,EAGH,MAgBMJ,EAAmB,CACvBM,KAAM,CACJC,KAAMZ,EAAO,GAlB6C,CAC5Da,UAAW,MACXC,UAAW,KACXC,UAAW,KACXC,QAAS,KACTC,SAAU,KACVC,OAAQ,KACRC,OAAQ,OAGwD,CAChEC,UAAW,KACXC,MAAO,IACPC,SAAU,QAOVC,OAAQ,CACNL,OAAQ,CACNM,SAAU,IACVC,KAAM,IACNC,OAAQ,IACRC,QAAS,IACTC,QAAS,IACTC,QAAS,IACTC,QAAS,KACTC,QAAS,IACTC,SAAU,IACVC,QAAS,KAEXC,MAAO,CACLC,KAAM,IACNC,QAAS,IACTC,MAAO,IACPC,SAAU,KACVC,SAAU,KACVC,MAAO,IACPC,KAAM"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { enforce } from 'n4s';
|
|
2
2
|
export { enforce } from 'n4s';
|
|
3
|
-
import { assign, tinyState, cache, isArray, isStringValue, asArray, hasOwnProperty, seq, StateMachine, invariant, isPromise, optionalFunctionValue, Predicates, isNullish, isEmpty, callEach, bindNot, either, isPositive, greaterThan, defaultTo, noop, isNotEmpty, isNotNullish, deferThrow, text, isUndefined, isNull, isFunction, numberEquals } from 'vest-utils';
|
|
3
|
+
import { assign, tinyState, cache, isArray, isStringValue, asArray, hasOwnProperty, seq, StateMachine, nonnullish, invariant, isPromise, optionalFunctionValue, Predicates, isNullish, isEmpty, callEach, bindNot, either, isPositive, greaterThan, defaultTo, noop, isNotEmpty, isNotNullish, deferThrow, text, isUndefined, isNull, isFunction, numberEquals } from 'vest-utils';
|
|
4
4
|
import { Isolate, VestRuntime, IsolateSelectors, IsolateMutator, Walker, Bus, RuntimeEvents, IsolateInspector, Reconciler } from 'vestjs-runtime';
|
|
5
5
|
import { createCascade } from 'context';
|
|
6
6
|
|
|
@@ -232,6 +232,25 @@ function setPending(isolate) {
|
|
|
232
232
|
}
|
|
233
233
|
const CommonStateMachine = StateMachine(machine$1);
|
|
234
234
|
|
|
235
|
+
class VestIsolate {
|
|
236
|
+
static getStatus(isolate) {
|
|
237
|
+
return nonnullish(isolate.status);
|
|
238
|
+
}
|
|
239
|
+
static setStatus(isolate, status, payload) {
|
|
240
|
+
isolate.status = this.stateMachine.staticTransition(VestIsolate.getStatus(isolate), status, payload);
|
|
241
|
+
}
|
|
242
|
+
static statusEquals(isolate, status) {
|
|
243
|
+
return VestIsolate.getStatus(isolate) === status;
|
|
244
|
+
}
|
|
245
|
+
static setPending(isolate) {
|
|
246
|
+
this.setStatus(isolate, CommonStates.PENDING);
|
|
247
|
+
}
|
|
248
|
+
static isPending(isolate) {
|
|
249
|
+
return VestIsolate.statusEquals(isolate, CommonStates.PENDING);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
VestIsolate.stateMachine = CommonStateMachine;
|
|
253
|
+
|
|
235
254
|
var ErrorStrings;
|
|
236
255
|
(function (ErrorStrings) {
|
|
237
256
|
ErrorStrings["HOOK_CALLED_OUTSIDE"] = "hook called outside of a running suite.";
|
|
@@ -318,7 +337,7 @@ var TestSeverity;
|
|
|
318
337
|
TestSeverity["Warning"] = "warning";
|
|
319
338
|
})(TestSeverity || (TestSeverity = {}));
|
|
320
339
|
|
|
321
|
-
class VestTest {
|
|
340
|
+
class VestTest extends VestIsolate {
|
|
322
341
|
// Read
|
|
323
342
|
static getData(test) {
|
|
324
343
|
invariant(test.data);
|
|
@@ -337,9 +356,6 @@ class VestTest {
|
|
|
337
356
|
static warns(test) {
|
|
338
357
|
return VestTest.getData(test).severity === TestSeverity.Warning;
|
|
339
358
|
}
|
|
340
|
-
static isPending(test) {
|
|
341
|
-
return VestTest.statusEquals(test, TestStatus.PENDING);
|
|
342
|
-
}
|
|
343
359
|
static isOmitted(test) {
|
|
344
360
|
return VestTest.statusEquals(test, TestStatus.OMITTED);
|
|
345
361
|
}
|
|
@@ -382,13 +398,10 @@ class VestTest {
|
|
|
382
398
|
static isAsyncTest(test) {
|
|
383
399
|
return isPromise(VestTest.getData(test).asyncTest);
|
|
384
400
|
}
|
|
385
|
-
static statusEquals(test, status) {
|
|
386
|
-
return test.status === status;
|
|
387
|
-
}
|
|
388
401
|
// Mutate
|
|
389
|
-
static setPending(test) {
|
|
390
|
-
|
|
391
|
-
}
|
|
402
|
+
// static setPending(test: TIsolateTest) {
|
|
403
|
+
// this.setStatus(test, TestStatus.PENDING);
|
|
404
|
+
// }
|
|
392
405
|
static fail(test) {
|
|
393
406
|
VestTest.setStatus(test, VestTest.warns(test) ? TestStatus.WARNING : TestStatus.FAILED);
|
|
394
407
|
}
|
|
@@ -424,10 +437,8 @@ class VestTest {
|
|
|
424
437
|
static reset(test) {
|
|
425
438
|
VestTest.setStatus(test, TestAction.RESET);
|
|
426
439
|
}
|
|
427
|
-
static setStatus(test, status, payload) {
|
|
428
|
-
test.status = IsolateTestStateMachine.staticTransition(test.status, status, payload);
|
|
429
|
-
}
|
|
430
440
|
}
|
|
441
|
+
VestTest.stateMachine = IsolateTestStateMachine;
|
|
431
442
|
|
|
432
443
|
function nonMatchingFieldName(WithFieldName, fieldName) {
|
|
433
444
|
return !!fieldName && !matchingFieldName(WithFieldName, fieldName);
|
|
@@ -448,7 +459,7 @@ class SuiteWalker {
|
|
|
448
459
|
if (!root) {
|
|
449
460
|
return false;
|
|
450
461
|
}
|
|
451
|
-
return Walker.some(root, Predicates.all(
|
|
462
|
+
return Walker.some(root, Predicates.all(VestIsolate.isPending, predicate !== null && predicate !== void 0 ? predicate : true));
|
|
452
463
|
}
|
|
453
464
|
// Checks whether there are pending isolates in the tree.
|
|
454
465
|
// If a fieldname is provided, will only check tests with a matching fieldname.
|
|
@@ -459,9 +470,6 @@ class SuiteWalker {
|
|
|
459
470
|
}
|
|
460
471
|
}
|
|
461
472
|
SuiteWalker.defaultRoot = VestRuntime.useAvailableRoot;
|
|
462
|
-
function isPendingStatus(isolate) {
|
|
463
|
-
return isolate.status === CommonStates.PENDING;
|
|
464
|
-
}
|
|
465
473
|
|
|
466
474
|
class TestWalker {
|
|
467
475
|
static hasNoTests(root = TestWalker.defaultRoot()) {
|
|
@@ -819,6 +827,7 @@ function bindSuiteSelectors(get) {
|
|
|
819
827
|
isPending: (...args) => {
|
|
820
828
|
return get().isPending(...args);
|
|
821
829
|
},
|
|
830
|
+
isTested: (...args) => get().isTested(...args),
|
|
822
831
|
isValid: (...args) => get().isValid(...args),
|
|
823
832
|
isValidByGroup: (...args) => get().isValidByGroup(...args),
|
|
824
833
|
};
|
|
@@ -837,6 +846,7 @@ function suiteSelectors(summary) {
|
|
|
837
846
|
hasWarnings,
|
|
838
847
|
hasWarningsByGroup,
|
|
839
848
|
isPending,
|
|
849
|
+
isTested,
|
|
840
850
|
isValid,
|
|
841
851
|
isValidByGroup,
|
|
842
852
|
};
|
|
@@ -867,6 +877,10 @@ function suiteSelectors(summary) {
|
|
|
867
877
|
function hasErrors(fieldName) {
|
|
868
878
|
return hasFailures(summary, SeverityCount.ERROR_COUNT, fieldName);
|
|
869
879
|
}
|
|
880
|
+
function isTested(fieldName) {
|
|
881
|
+
var _a;
|
|
882
|
+
return isPositive((_a = summary.tests[fieldName]) === null || _a === void 0 ? void 0 : _a.testCount);
|
|
883
|
+
}
|
|
870
884
|
function hasWarningsByGroup(groupName, fieldName) {
|
|
871
885
|
return hasFailuresByGroup(summary, SeverityCount.WARN_COUNT, groupName, fieldName);
|
|
872
886
|
}
|