vest 5.2.0 → 5.2.1
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,20 +1,63 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var vestUtils = require('vest-utils');
|
|
3
4
|
var vestjsRuntime = require('vestjs-runtime');
|
|
4
5
|
|
|
5
6
|
class SuiteSerializer {
|
|
6
7
|
static serialize(suite) {
|
|
7
8
|
const dump = Object.assign(Object.assign({}, suite.dump()), { output: undefined });
|
|
8
|
-
return vestjsRuntime.IsolateSerializer.serialize(dump);
|
|
9
|
+
return vestjsRuntime.IsolateSerializer.serialize(dump, MiniMap);
|
|
9
10
|
}
|
|
10
11
|
static deserialize(serialized) {
|
|
11
|
-
return vestjsRuntime.IsolateSerializer.deserialize(serialized);
|
|
12
|
+
return vestjsRuntime.IsolateSerializer.deserialize(serialized, MiniMap);
|
|
12
13
|
}
|
|
13
14
|
static resume(suite, root) {
|
|
14
15
|
const suiteRoot = SuiteSerializer.deserialize(root);
|
|
15
16
|
suite.resume(suiteRoot);
|
|
16
17
|
}
|
|
17
18
|
}
|
|
19
|
+
const testMiniMap = {
|
|
20
|
+
asyncTest: '_at',
|
|
21
|
+
fieldName: 'fN',
|
|
22
|
+
groupName: 'gN',
|
|
23
|
+
message: 'ms',
|
|
24
|
+
severity: 'sv',
|
|
25
|
+
status: 'st',
|
|
26
|
+
testFn: '_tf', // testFn is not serialized
|
|
27
|
+
};
|
|
28
|
+
const focusMiniMap = {
|
|
29
|
+
focusMode: 'fM',
|
|
30
|
+
match: 'm',
|
|
31
|
+
matchAll: 'mA',
|
|
32
|
+
};
|
|
33
|
+
const MiniMap = {
|
|
34
|
+
keys: {
|
|
35
|
+
data: vestUtils.assign({}, testMiniMap, focusMiniMap),
|
|
36
|
+
},
|
|
37
|
+
values: {
|
|
38
|
+
status: {
|
|
39
|
+
CANCELED: 'C',
|
|
40
|
+
DONE: 'D',
|
|
41
|
+
FAILED: 'F',
|
|
42
|
+
INITIAL: 'I',
|
|
43
|
+
OMITTED: 'O',
|
|
44
|
+
PASSING: 'P',
|
|
45
|
+
PENDING: 'PE',
|
|
46
|
+
SKIPPED: 'S',
|
|
47
|
+
UNTESTED: 'U',
|
|
48
|
+
WARNING: 'W',
|
|
49
|
+
},
|
|
50
|
+
$type: {
|
|
51
|
+
Each: 'E',
|
|
52
|
+
Focused: 'F',
|
|
53
|
+
Group: 'G',
|
|
54
|
+
OmitWhen: 'OW',
|
|
55
|
+
SkipWhen: 'SW',
|
|
56
|
+
Suite: 'S',
|
|
57
|
+
Test: 'T',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
};
|
|
18
61
|
|
|
19
62
|
exports.SuiteSerializer = SuiteSerializer;
|
|
20
63
|
//# 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":["IsolateSerializer"],"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":["IsolateSerializer","assign"],"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,OAAOA,+BAAiB,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;KACnD;IAED,OAAO,WAAW,CAChB,UAAwD,EAAA;QAExD,OAAOA,+BAAiB,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,EAAEC,gBAAM,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
|
-
"use strict";var e=require("vestjs-runtime");class
|
|
1
|
+
"use strict";var e=require("vest-utils"),s=require("vestjs-runtime");class t{static serialize(e){const t=Object.assign(Object.assign({},e.dump()),{output:void 0});return s.IsolateSerializer.serialize(t,i)}static deserialize(e){return s.IsolateSerializer.deserialize(e,i)}static resume(e,s){const i=t.deserialize(s);e.resume(i)}}const i={keys:{data:e.assign({},{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"}}};exports.SuiteSerializer=t;
|
|
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":"2EAYaA,EACXC,iBAAiBC,GACf,MAAMC,EAAYC,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAAAH,EAAMC,QAAM,CAAEG,YAAQC,IAExC,OAAOC,oBAAkBC,UAAUN,EAAMO,EAC1C,CAEDT,mBACEU,GAEA,OAAOH,oBAAkBI,YAAYD,EAAYD,EAClD,CAEDT,cACEC,EACAW,GAEA,MAAMC,EAAYd,EAAgBY,YAAYC,GAE9CX,EAAMa,OAAOD,EACd,EAGH,MAgBMJ,EAAmB,CACvBM,KAAM,CACJC,KAAMZ,EAAMA,OAAC,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"}
|
|
@@ -233,6 +233,25 @@ function setPending(isolate) {
|
|
|
233
233
|
}
|
|
234
234
|
const CommonStateMachine = vestUtils.StateMachine(machine$1);
|
|
235
235
|
|
|
236
|
+
class VestIsolate {
|
|
237
|
+
static getStatus(isolate) {
|
|
238
|
+
return vestUtils.nonnullish(isolate.status);
|
|
239
|
+
}
|
|
240
|
+
static setStatus(isolate, status, payload) {
|
|
241
|
+
isolate.status = this.stateMachine.staticTransition(VestIsolate.getStatus(isolate), status, payload);
|
|
242
|
+
}
|
|
243
|
+
static statusEquals(isolate, status) {
|
|
244
|
+
return VestIsolate.getStatus(isolate) === status;
|
|
245
|
+
}
|
|
246
|
+
static setPending(isolate) {
|
|
247
|
+
this.setStatus(isolate, CommonStates.PENDING);
|
|
248
|
+
}
|
|
249
|
+
static isPending(isolate) {
|
|
250
|
+
return VestIsolate.statusEquals(isolate, CommonStates.PENDING);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
VestIsolate.stateMachine = CommonStateMachine;
|
|
254
|
+
|
|
236
255
|
var ErrorStrings;
|
|
237
256
|
(function (ErrorStrings) {
|
|
238
257
|
ErrorStrings["HOOK_CALLED_OUTSIDE"] = "hook called outside of a running suite.";
|
|
@@ -319,7 +338,7 @@ var TestSeverity;
|
|
|
319
338
|
TestSeverity["Warning"] = "warning";
|
|
320
339
|
})(TestSeverity || (TestSeverity = {}));
|
|
321
340
|
|
|
322
|
-
class VestTest {
|
|
341
|
+
class VestTest extends VestIsolate {
|
|
323
342
|
// Read
|
|
324
343
|
static getData(test) {
|
|
325
344
|
vestUtils.invariant(test.data);
|
|
@@ -338,9 +357,6 @@ class VestTest {
|
|
|
338
357
|
static warns(test) {
|
|
339
358
|
return VestTest.getData(test).severity === TestSeverity.Warning;
|
|
340
359
|
}
|
|
341
|
-
static isPending(test) {
|
|
342
|
-
return VestTest.statusEquals(test, TestStatus.PENDING);
|
|
343
|
-
}
|
|
344
360
|
static isOmitted(test) {
|
|
345
361
|
return VestTest.statusEquals(test, TestStatus.OMITTED);
|
|
346
362
|
}
|
|
@@ -383,13 +399,10 @@ class VestTest {
|
|
|
383
399
|
static isAsyncTest(test) {
|
|
384
400
|
return vestUtils.isPromise(VestTest.getData(test).asyncTest);
|
|
385
401
|
}
|
|
386
|
-
static statusEquals(test, status) {
|
|
387
|
-
return test.status === status;
|
|
388
|
-
}
|
|
389
402
|
// Mutate
|
|
390
|
-
static setPending(test) {
|
|
391
|
-
|
|
392
|
-
}
|
|
403
|
+
// static setPending(test: TIsolateTest) {
|
|
404
|
+
// this.setStatus(test, TestStatus.PENDING);
|
|
405
|
+
// }
|
|
393
406
|
static fail(test) {
|
|
394
407
|
VestTest.setStatus(test, VestTest.warns(test) ? TestStatus.WARNING : TestStatus.FAILED);
|
|
395
408
|
}
|
|
@@ -425,10 +438,8 @@ class VestTest {
|
|
|
425
438
|
static reset(test) {
|
|
426
439
|
VestTest.setStatus(test, TestAction.RESET);
|
|
427
440
|
}
|
|
428
|
-
static setStatus(test, status, payload) {
|
|
429
|
-
test.status = IsolateTestStateMachine.staticTransition(test.status, status, payload);
|
|
430
|
-
}
|
|
431
441
|
}
|
|
442
|
+
VestTest.stateMachine = IsolateTestStateMachine;
|
|
432
443
|
|
|
433
444
|
function nonMatchingFieldName(WithFieldName, fieldName) {
|
|
434
445
|
return !!fieldName && !matchingFieldName(WithFieldName, fieldName);
|
|
@@ -449,7 +460,7 @@ class SuiteWalker {
|
|
|
449
460
|
if (!root) {
|
|
450
461
|
return false;
|
|
451
462
|
}
|
|
452
|
-
return vestjsRuntime.Walker.some(root, vestUtils.Predicates.all(
|
|
463
|
+
return vestjsRuntime.Walker.some(root, vestUtils.Predicates.all(VestIsolate.isPending, predicate !== null && predicate !== void 0 ? predicate : true));
|
|
453
464
|
}
|
|
454
465
|
// Checks whether there are pending isolates in the tree.
|
|
455
466
|
// If a fieldname is provided, will only check tests with a matching fieldname.
|
|
@@ -460,9 +471,6 @@ class SuiteWalker {
|
|
|
460
471
|
}
|
|
461
472
|
}
|
|
462
473
|
SuiteWalker.defaultRoot = vestjsRuntime.VestRuntime.useAvailableRoot;
|
|
463
|
-
function isPendingStatus(isolate) {
|
|
464
|
-
return isolate.status === CommonStates.PENDING;
|
|
465
|
-
}
|
|
466
474
|
|
|
467
475
|
class TestWalker {
|
|
468
476
|
static hasNoTests(root = TestWalker.defaultRoot()) {
|
|
@@ -820,6 +828,7 @@ function bindSuiteSelectors(get) {
|
|
|
820
828
|
isPending: (...args) => {
|
|
821
829
|
return get().isPending(...args);
|
|
822
830
|
},
|
|
831
|
+
isTested: (...args) => get().isTested(...args),
|
|
823
832
|
isValid: (...args) => get().isValid(...args),
|
|
824
833
|
isValidByGroup: (...args) => get().isValidByGroup(...args),
|
|
825
834
|
};
|
|
@@ -838,6 +847,7 @@ function suiteSelectors(summary) {
|
|
|
838
847
|
hasWarnings,
|
|
839
848
|
hasWarningsByGroup,
|
|
840
849
|
isPending,
|
|
850
|
+
isTested,
|
|
841
851
|
isValid,
|
|
842
852
|
isValidByGroup,
|
|
843
853
|
};
|
|
@@ -868,6 +878,10 @@ function suiteSelectors(summary) {
|
|
|
868
878
|
function hasErrors(fieldName) {
|
|
869
879
|
return hasFailures(summary, SeverityCount.ERROR_COUNT, fieldName);
|
|
870
880
|
}
|
|
881
|
+
function isTested(fieldName) {
|
|
882
|
+
var _a;
|
|
883
|
+
return vestUtils.isPositive((_a = summary.tests[fieldName]) === null || _a === void 0 ? void 0 : _a.testCount);
|
|
884
|
+
}
|
|
871
885
|
function hasWarningsByGroup(groupName, fieldName) {
|
|
872
886
|
return hasFailuresByGroup(summary, SeverityCount.WARN_COUNT, groupName, fieldName);
|
|
873
887
|
}
|