vest 5.0.0-dev-781e21 → 5.0.2-dev-d315d9

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.
Files changed (182) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +2 -57
  3. package/dist/cjs/classnames.development.js +18 -16
  4. package/dist/cjs/classnames.production.js +1 -1
  5. package/dist/cjs/enforce/compose.development.js +5 -54
  6. package/dist/cjs/enforce/compose.production.js +1 -1
  7. package/dist/cjs/enforce/compounds.development.js +20 -83
  8. package/dist/cjs/enforce/compounds.production.js +1 -1
  9. package/dist/cjs/enforce/schema.development.js +19 -82
  10. package/dist/cjs/enforce/schema.production.js +1 -1
  11. package/dist/cjs/parser.development.js +12 -9
  12. package/dist/cjs/parser.production.js +1 -1
  13. package/dist/cjs/promisify.development.js +4 -8
  14. package/dist/cjs/promisify.production.js +1 -1
  15. package/dist/cjs/vest.development.js +1287 -1153
  16. package/dist/cjs/vest.production.js +1 -1
  17. package/dist/es/classnames.development.js +20 -18
  18. package/dist/es/classnames.production.js +1 -1
  19. package/dist/es/enforce/compose.development.js +1 -58
  20. package/dist/es/enforce/compose.production.js +1 -1
  21. package/dist/es/enforce/compounds.development.js +2 -90
  22. package/dist/es/enforce/compounds.production.js +1 -1
  23. package/dist/es/enforce/schema.development.js +2 -88
  24. package/dist/es/enforce/schema.production.js +1 -1
  25. package/dist/es/parser.development.js +12 -9
  26. package/dist/es/parser.production.js +1 -1
  27. package/dist/es/promisify.development.js +5 -9
  28. package/dist/es/promisify.production.js +1 -1
  29. package/dist/es/vest.development.js +1286 -1148
  30. package/dist/es/vest.production.js +1 -1
  31. package/dist/umd/classnames.development.js +21 -19
  32. package/dist/umd/classnames.production.js +1 -1
  33. package/dist/umd/enforce/compose.development.js +9 -57
  34. package/dist/umd/enforce/compose.production.js +1 -1
  35. package/dist/umd/enforce/compounds.development.js +32 -94
  36. package/dist/umd/enforce/compounds.production.js +1 -1
  37. package/dist/umd/enforce/schema.development.js +32 -94
  38. package/dist/umd/enforce/schema.production.js +1 -1
  39. package/dist/umd/parser.development.js +16 -13
  40. package/dist/umd/parser.production.js +1 -1
  41. package/dist/umd/promisify.development.js +7 -11
  42. package/dist/umd/promisify.production.js +1 -1
  43. package/dist/umd/vest.development.js +1289 -1155
  44. package/dist/umd/vest.production.js +1 -1
  45. package/package.json +12 -16
  46. package/src/__tests__/__snapshots__/integration.async-tests.test.ts.snap +71 -0
  47. package/src/__tests__/__snapshots__/integration.base.test.ts.snap +71 -0
  48. package/src/__tests__/__snapshots__/integration.stateful-async.test.ts.snap +243 -0
  49. package/src/__tests__/__snapshots__/integration.stateful-tests.test.ts.snap +376 -0
  50. package/src/__tests__/integration.async-tests.test.ts +90 -0
  51. package/src/__tests__/integration.base.test.ts +45 -0
  52. package/src/__tests__/integration.exclusive.test.ts +88 -0
  53. package/src/__tests__/integration.stateful-async.test.ts +137 -0
  54. package/src/__tests__/integration.stateful-tests.test.ts +155 -0
  55. package/src/__tests__/isolate.test.ts +288 -0
  56. package/src/__tests__/state_refill.test.ts +41 -0
  57. package/src/core/SuiteWalker/SuiteWalker.ts +64 -0
  58. package/src/core/SuiteWalker/__tests__/hasRemainingTests.test.ts +130 -0
  59. package/src/core/VestBus/VestBus.ts +78 -0
  60. package/src/core/context/PersistedContext.ts +243 -0
  61. package/src/core/context/SuiteContext.ts +74 -0
  62. package/src/core/isolate/IsolateTest/IsolateTest.ts +213 -0
  63. package/src/core/isolate/IsolateTest/IsolateTestReconciler.ts +156 -0
  64. package/src/core/isolate/IsolateTest/IsolateTestStateMachine.ts +69 -0
  65. package/src/core/isolate/IsolateTest/SimpleStateMachine.ts +43 -0
  66. package/src/core/isolate/IsolateTest/TestWalker.ts +77 -0
  67. package/src/core/isolate/IsolateTypes.ts +10 -0
  68. package/src/core/isolate/isIsolate.ts +6 -0
  69. package/src/core/isolate/isolate.ts +110 -0
  70. package/src/core/isolate/reconciler/Reconciler/Reconciler.ts +123 -0
  71. package/src/core/isolate/reconciler/cancelOverriddenPendingTest.ts +15 -0
  72. package/src/core/isolate/reconciler/isSameProfileTest.ts +12 -0
  73. package/src/core/isolate/walker.ts +127 -0
  74. package/src/core/test/TestTypes.ts +3 -0
  75. package/src/core/test/__tests__/IsolateTest.test.ts +152 -0
  76. package/src/core/test/__tests__/__snapshots__/IsolateTest.test.ts.snap +39 -0
  77. package/src/core/test/__tests__/__snapshots__/memo.test.ts.snap +101 -0
  78. package/src/core/test/__tests__/__snapshots__/test.test.ts.snap +231 -0
  79. package/src/core/test/__tests__/key.test.ts +195 -0
  80. package/src/core/test/__tests__/memo.test.ts +218 -0
  81. package/src/core/test/__tests__/merging_of_previous_test_runs.test.ts +341 -0
  82. package/src/core/test/__tests__/runAsyncTest.test.ts +175 -0
  83. package/src/core/test/__tests__/test.test.ts +226 -0
  84. package/src/core/test/helpers/__tests__/nonMatchingSeverityProfile.test.ts +52 -0
  85. package/src/core/test/helpers/asVestTest.ts +9 -0
  86. package/src/core/test/helpers/matchingFieldName.ts +16 -0
  87. package/src/core/test/helpers/matchingGroupName.ts +12 -0
  88. package/src/core/test/helpers/nonMatchingSeverityProfile.ts +14 -0
  89. package/src/core/test/helpers/shouldUseErrorMessage.ts +9 -0
  90. package/src/core/test/test.memo.ts +81 -0
  91. package/src/core/test/test.ts +64 -0
  92. package/src/core/test/testLevelFlowControl/runTest.ts +86 -0
  93. package/src/core/test/testLevelFlowControl/verifyTestRun.ts +32 -0
  94. package/src/core/test/testObjectIsolate.ts +11 -0
  95. package/src/errors/ErrorStrings.ts +4 -0
  96. package/src/exports/__tests__/classnames.test.ts +92 -0
  97. package/src/exports/__tests__/parser.test.ts +441 -0
  98. package/src/exports/__tests__/promisify.test.ts +77 -0
  99. package/src/exports/classnames.ts +35 -0
  100. package/src/exports/enforce@compose.ts +1 -0
  101. package/src/exports/enforce@compounds.ts +1 -0
  102. package/src/exports/enforce@schema.ts +1 -0
  103. package/src/exports/parser.ts +63 -0
  104. package/src/exports/promisify.ts +18 -0
  105. package/src/hooks/__tests__/__snapshots__/include.test.ts.snap +794 -0
  106. package/src/hooks/__tests__/eager.test.ts +130 -0
  107. package/src/hooks/__tests__/exclusive.test.ts +578 -0
  108. package/src/hooks/__tests__/include.test.ts +431 -0
  109. package/src/hooks/__tests__/optional.test.ts +83 -0
  110. package/src/hooks/__tests__/warn.test.ts +42 -0
  111. package/src/hooks/exclusive.ts +179 -0
  112. package/src/hooks/include.ts +54 -0
  113. package/src/hooks/mode.ts +47 -0
  114. package/src/hooks/optional/OptionalTypes.ts +31 -0
  115. package/src/hooks/optional/optional.ts +69 -0
  116. package/src/hooks/warn.ts +19 -0
  117. package/src/isolates/__tests__/__snapshots__/each.test.ts.snap +3 -0
  118. package/src/isolates/__tests__/__snapshots__/group.test.ts.snap +114 -0
  119. package/src/isolates/__tests__/__snapshots__/omitWhen.test.ts.snap +443 -0
  120. package/src/isolates/__tests__/__snapshots__/skipWhen.test.ts.snap +99 -0
  121. package/src/isolates/__tests__/each.test.ts +35 -0
  122. package/src/isolates/__tests__/group.test.ts +362 -0
  123. package/src/isolates/__tests__/omitWhen.test.ts +246 -0
  124. package/src/isolates/__tests__/skipWhen.test.ts +163 -0
  125. package/src/isolates/each.ts +30 -0
  126. package/src/isolates/group.ts +9 -0
  127. package/src/isolates/omitWhen.ts +41 -0
  128. package/src/isolates/skipWhen.ts +42 -0
  129. package/src/suite/__tests__/__snapshots__/create.test.ts.snap +67 -0
  130. package/src/suite/__tests__/create.test.ts +109 -0
  131. package/src/suite/__tests__/remove.test.ts +50 -0
  132. package/src/suite/__tests__/resetField.test.ts +74 -0
  133. package/src/suite/createSuite.ts +94 -0
  134. package/src/suite/runCallbacks.ts +28 -0
  135. package/src/suiteResult/Severity.ts +15 -0
  136. package/src/suiteResult/SuiteResultTypes.ts +42 -0
  137. package/src/suiteResult/__tests__/done.test.ts +334 -0
  138. package/src/suiteResult/__tests__/produce.test.ts +163 -0
  139. package/src/suiteResult/done/deferDoneCallback.ts +28 -0
  140. package/src/suiteResult/done/shouldSkipDoneRegistration.ts +20 -0
  141. package/src/suiteResult/selectors/__tests__/__snapshots__/collectFailureMessages.test.ts.snap +89 -0
  142. package/src/suiteResult/selectors/__tests__/collectFailureMessages.test.ts +124 -0
  143. package/src/suiteResult/selectors/__tests__/getFailures.test.ts +158 -0
  144. package/src/suiteResult/selectors/__tests__/getFailuresByGroup.test.ts +199 -0
  145. package/src/suiteResult/selectors/__tests__/hasFailures.test.ts +141 -0
  146. package/src/suiteResult/selectors/__tests__/hasFailuresByGroup.test.ts +185 -0
  147. package/src/suiteResult/selectors/__tests__/hasFailuresByTestObject.test.ts +88 -0
  148. package/src/suiteResult/selectors/__tests__/isValid.test.ts +359 -0
  149. package/src/suiteResult/selectors/__tests__/isValidByGroup.test.ts +480 -0
  150. package/src/suiteResult/selectors/collectFailures.ts +43 -0
  151. package/src/suiteResult/selectors/hasFailuresByTestObjects.ts +62 -0
  152. package/src/suiteResult/selectors/produceSuiteSummary.ts +135 -0
  153. package/src/suiteResult/selectors/shouldAddValidProperty.ts +148 -0
  154. package/src/suiteResult/selectors/suiteSelectors.ts +199 -0
  155. package/src/suiteResult/suiteResult.ts +15 -0
  156. package/src/suiteResult/suiteRunResult.ts +43 -0
  157. package/src/vest.ts +36 -0
  158. package/testUtils/TVestMock.ts +5 -0
  159. package/testUtils/__tests__/partition.test.ts +4 -4
  160. package/testUtils/mockThrowError.ts +4 -2
  161. package/testUtils/suiteDummy.ts +2 -1
  162. package/testUtils/testDummy.ts +12 -10
  163. package/testUtils/testPromise.ts +3 -0
  164. package/tsconfig.json +84 -2
  165. package/types/classnames.d.ts +39 -4
  166. package/types/classnames.d.ts.map +1 -0
  167. package/types/enforce/compose.d.ts +2 -126
  168. package/types/enforce/compose.d.ts.map +1 -0
  169. package/types/enforce/compounds.d.ts +2 -136
  170. package/types/enforce/compounds.d.ts.map +1 -0
  171. package/types/enforce/schema.d.ts +2 -144
  172. package/types/enforce/schema.d.ts.map +1 -0
  173. package/types/parser.d.ts +45 -10
  174. package/types/parser.d.ts.map +1 -0
  175. package/types/promisify.d.ts +36 -34
  176. package/types/promisify.d.ts.map +1 -0
  177. package/types/vest.d.ts +169 -224
  178. package/types/vest.d.ts.map +1 -0
  179. package/CHANGELOG.md +0 -87
  180. package/testUtils/expandStateRef.ts +0 -8
  181. package/testUtils/runCreateRef.ts +0 -10
  182. package/testUtils/testObjects.ts +0 -6
@@ -0,0 +1,794 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`include Field is excluded via \`skip\` Should disregard \`include.when\` and avoid running the test 1`] = `
4
+ {
5
+ "done": [Function],
6
+ "errorCount": 1,
7
+ "getErrors": [Function],
8
+ "getErrorsByGroup": [Function],
9
+ "getWarnings": [Function],
10
+ "getWarningsByGroup": [Function],
11
+ "groups": {},
12
+ "hasErrors": [Function],
13
+ "hasErrorsByGroup": [Function],
14
+ "hasWarnings": [Function],
15
+ "hasWarningsByGroup": [Function],
16
+ "isValid": [Function],
17
+ "isValidByGroup": [Function],
18
+ "suiteName": undefined,
19
+ "testCount": 1,
20
+ "tests": {
21
+ "field_1": {
22
+ "errorCount": 0,
23
+ "errors": [],
24
+ "testCount": 0,
25
+ "valid": false,
26
+ "warnCount": 0,
27
+ "warnings": [],
28
+ },
29
+ "field_2": {
30
+ "errorCount": 1,
31
+ "errors": [],
32
+ "testCount": 1,
33
+ "valid": false,
34
+ "warnCount": 0,
35
+ "warnings": [],
36
+ },
37
+ },
38
+ "valid": false,
39
+ "warnCount": 0,
40
+ }
41
+ `;
42
+
43
+ exports[`include Field is excluded via \`skip\` Should disregard \`include\` and avoid running the test 1`] = `
44
+ {
45
+ "done": [Function],
46
+ "errorCount": 1,
47
+ "getErrors": [Function],
48
+ "getErrorsByGroup": [Function],
49
+ "getWarnings": [Function],
50
+ "getWarningsByGroup": [Function],
51
+ "groups": {},
52
+ "hasErrors": [Function],
53
+ "hasErrorsByGroup": [Function],
54
+ "hasWarnings": [Function],
55
+ "hasWarningsByGroup": [Function],
56
+ "isValid": [Function],
57
+ "isValidByGroup": [Function],
58
+ "suiteName": undefined,
59
+ "testCount": 1,
60
+ "tests": {
61
+ "field_1": {
62
+ "errorCount": 0,
63
+ "errors": [],
64
+ "testCount": 0,
65
+ "valid": false,
66
+ "warnCount": 0,
67
+ "warnings": [],
68
+ },
69
+ "field_2": {
70
+ "errorCount": 1,
71
+ "errors": [],
72
+ "testCount": 1,
73
+ "valid": false,
74
+ "warnCount": 0,
75
+ "warnings": [],
76
+ },
77
+ },
78
+ "valid": false,
79
+ "warnCount": 0,
80
+ }
81
+ `;
82
+
83
+ exports[`include Test is excluded by being out of an included group Should disregard \`include\` and avoid running the test 1`] = `
84
+ {
85
+ "done": [Function],
86
+ "errorCount": 0,
87
+ "getErrors": [Function],
88
+ "getErrorsByGroup": [Function],
89
+ "getWarnings": [Function],
90
+ "getWarningsByGroup": [Function],
91
+ "groups": {
92
+ "g2": {
93
+ "field_1": {
94
+ "errorCount": 0,
95
+ "errors": [],
96
+ "testCount": 0,
97
+ "valid": false,
98
+ "warnCount": 0,
99
+ "warnings": [],
100
+ },
101
+ },
102
+ },
103
+ "hasErrors": [Function],
104
+ "hasErrorsByGroup": [Function],
105
+ "hasWarnings": [Function],
106
+ "hasWarningsByGroup": [Function],
107
+ "isValid": [Function],
108
+ "isValidByGroup": [Function],
109
+ "suiteName": undefined,
110
+ "testCount": 0,
111
+ "tests": {
112
+ "field_1": {
113
+ "errorCount": 0,
114
+ "errors": [],
115
+ "testCount": 0,
116
+ "valid": false,
117
+ "warnCount": 0,
118
+ "warnings": [],
119
+ },
120
+ },
121
+ "valid": false,
122
+ "warnCount": 0,
123
+ }
124
+ `;
125
+
126
+ exports[`include Test is excluded via \`skip.group\` Should disregard \`include.when\` and avoid running the test 1`] = `
127
+ {
128
+ "done": [Function],
129
+ "errorCount": 1,
130
+ "getErrors": [Function],
131
+ "getErrorsByGroup": [Function],
132
+ "getWarnings": [Function],
133
+ "getWarningsByGroup": [Function],
134
+ "groups": {
135
+ "g1": {
136
+ "field_1": {
137
+ "errorCount": 0,
138
+ "errors": [],
139
+ "testCount": 0,
140
+ "valid": false,
141
+ "warnCount": 0,
142
+ "warnings": [],
143
+ },
144
+ "field_2": {
145
+ "errorCount": 0,
146
+ "errors": [],
147
+ "testCount": 0,
148
+ "valid": false,
149
+ "warnCount": 0,
150
+ "warnings": [],
151
+ },
152
+ },
153
+ },
154
+ "hasErrors": [Function],
155
+ "hasErrorsByGroup": [Function],
156
+ "hasWarnings": [Function],
157
+ "hasWarningsByGroup": [Function],
158
+ "isValid": [Function],
159
+ "isValidByGroup": [Function],
160
+ "suiteName": undefined,
161
+ "testCount": 1,
162
+ "tests": {
163
+ "field_1": {
164
+ "errorCount": 1,
165
+ "errors": [],
166
+ "testCount": 1,
167
+ "valid": false,
168
+ "warnCount": 0,
169
+ "warnings": [],
170
+ },
171
+ "field_2": {
172
+ "errorCount": 0,
173
+ "errors": [],
174
+ "testCount": 0,
175
+ "valid": false,
176
+ "warnCount": 0,
177
+ "warnings": [],
178
+ },
179
+ },
180
+ "valid": false,
181
+ "warnCount": 0,
182
+ }
183
+ `;
184
+
185
+ exports[`include Test is excluded via \`skip.group\` Should disregard \`include\` and avoid running the test 1`] = `
186
+ {
187
+ "done": [Function],
188
+ "errorCount": 1,
189
+ "getErrors": [Function],
190
+ "getErrorsByGroup": [Function],
191
+ "getWarnings": [Function],
192
+ "getWarningsByGroup": [Function],
193
+ "groups": {
194
+ "g1": {
195
+ "field_1": {
196
+ "errorCount": 0,
197
+ "errors": [],
198
+ "testCount": 0,
199
+ "valid": false,
200
+ "warnCount": 0,
201
+ "warnings": [],
202
+ },
203
+ "field_2": {
204
+ "errorCount": 0,
205
+ "errors": [],
206
+ "testCount": 0,
207
+ "valid": false,
208
+ "warnCount": 0,
209
+ "warnings": [],
210
+ },
211
+ },
212
+ },
213
+ "hasErrors": [Function],
214
+ "hasErrorsByGroup": [Function],
215
+ "hasWarnings": [Function],
216
+ "hasWarningsByGroup": [Function],
217
+ "isValid": [Function],
218
+ "isValidByGroup": [Function],
219
+ "suiteName": undefined,
220
+ "testCount": 1,
221
+ "tests": {
222
+ "field_1": {
223
+ "errorCount": 1,
224
+ "errors": [],
225
+ "testCount": 1,
226
+ "valid": false,
227
+ "warnCount": 0,
228
+ "warnings": [],
229
+ },
230
+ "field_2": {
231
+ "errorCount": 0,
232
+ "errors": [],
233
+ "testCount": 0,
234
+ "valid": false,
235
+ "warnCount": 0,
236
+ "warnings": [],
237
+ },
238
+ },
239
+ "valid": false,
240
+ "warnCount": 0,
241
+ }
242
+ `;
243
+
244
+ exports[`include Test is excluded via \`skipWhen\` Should disregard \`include.when\` and avoid running the matching tests 1`] = `
245
+ {
246
+ "done": [Function],
247
+ "errorCount": 1,
248
+ "getErrors": [Function],
249
+ "getErrorsByGroup": [Function],
250
+ "getWarnings": [Function],
251
+ "getWarningsByGroup": [Function],
252
+ "groups": {},
253
+ "hasErrors": [Function],
254
+ "hasErrorsByGroup": [Function],
255
+ "hasWarnings": [Function],
256
+ "hasWarningsByGroup": [Function],
257
+ "isValid": [Function],
258
+ "isValidByGroup": [Function],
259
+ "suiteName": undefined,
260
+ "testCount": 1,
261
+ "tests": {
262
+ "field_1": {
263
+ "errorCount": 1,
264
+ "errors": [],
265
+ "testCount": 1,
266
+ "valid": false,
267
+ "warnCount": 0,
268
+ "warnings": [],
269
+ },
270
+ },
271
+ "valid": false,
272
+ "warnCount": 0,
273
+ }
274
+ `;
275
+
276
+ exports[`include Test is excluded via \`skipWhen\` Should disregard \`include\` and avoid running the matching tests 1`] = `
277
+ {
278
+ "done": [Function],
279
+ "errorCount": 1,
280
+ "getErrors": [Function],
281
+ "getErrorsByGroup": [Function],
282
+ "getWarnings": [Function],
283
+ "getWarningsByGroup": [Function],
284
+ "groups": {},
285
+ "hasErrors": [Function],
286
+ "hasErrorsByGroup": [Function],
287
+ "hasWarnings": [Function],
288
+ "hasWarningsByGroup": [Function],
289
+ "isValid": [Function],
290
+ "isValidByGroup": [Function],
291
+ "suiteName": undefined,
292
+ "testCount": 1,
293
+ "tests": {
294
+ "field_1": {
295
+ "errorCount": 1,
296
+ "errors": [],
297
+ "testCount": 1,
298
+ "valid": false,
299
+ "warnCount": 0,
300
+ "warnings": [],
301
+ },
302
+ },
303
+ "valid": false,
304
+ "warnCount": 0,
305
+ }
306
+ `;
307
+
308
+ exports[`include There is an \`onlyd\` field \`include\` is run as-is without modifiers Should run the included test along with the onlyd test 1`] = `
309
+ {
310
+ "done": [Function],
311
+ "errorCount": 2,
312
+ "getErrors": [Function],
313
+ "getErrorsByGroup": [Function],
314
+ "getWarnings": [Function],
315
+ "getWarningsByGroup": [Function],
316
+ "groups": {},
317
+ "hasErrors": [Function],
318
+ "hasErrorsByGroup": [Function],
319
+ "hasWarnings": [Function],
320
+ "hasWarningsByGroup": [Function],
321
+ "isValid": [Function],
322
+ "isValidByGroup": [Function],
323
+ "suiteName": undefined,
324
+ "testCount": 2,
325
+ "tests": {
326
+ "field_1": {
327
+ "errorCount": 1,
328
+ "errors": [],
329
+ "testCount": 1,
330
+ "valid": false,
331
+ "warnCount": 0,
332
+ "warnings": [],
333
+ },
334
+ "field_2": {
335
+ "errorCount": 1,
336
+ "errors": [],
337
+ "testCount": 1,
338
+ "valid": false,
339
+ "warnCount": 0,
340
+ "warnings": [],
341
+ },
342
+ },
343
+ "valid": false,
344
+ "warnCount": 0,
345
+ }
346
+ `;
347
+
348
+ exports[`include There is an \`onlyd\` field include().when() \`when\` param is a boolean when \`false\` Should skip run included field 1`] = `
349
+ {
350
+ "done": [Function],
351
+ "errorCount": 1,
352
+ "getErrors": [Function],
353
+ "getErrorsByGroup": [Function],
354
+ "getWarnings": [Function],
355
+ "getWarningsByGroup": [Function],
356
+ "groups": {},
357
+ "hasErrors": [Function],
358
+ "hasErrorsByGroup": [Function],
359
+ "hasWarnings": [Function],
360
+ "hasWarningsByGroup": [Function],
361
+ "isValid": [Function],
362
+ "isValidByGroup": [Function],
363
+ "suiteName": undefined,
364
+ "testCount": 1,
365
+ "tests": {
366
+ "field_1": {
367
+ "errorCount": 1,
368
+ "errors": [],
369
+ "testCount": 1,
370
+ "valid": false,
371
+ "warnCount": 0,
372
+ "warnings": [],
373
+ },
374
+ "field_2": {
375
+ "errorCount": 0,
376
+ "errors": [],
377
+ "testCount": 0,
378
+ "valid": false,
379
+ "warnCount": 0,
380
+ "warnings": [],
381
+ },
382
+ "field_3": {
383
+ "errorCount": 0,
384
+ "errors": [],
385
+ "testCount": 0,
386
+ "valid": false,
387
+ "warnCount": 0,
388
+ "warnings": [],
389
+ },
390
+ },
391
+ "valid": false,
392
+ "warnCount": 0,
393
+ }
394
+ `;
395
+
396
+ exports[`include There is an \`onlyd\` field include().when() \`when\` param is a boolean when \`true\` Should run included field 1`] = `
397
+ {
398
+ "done": [Function],
399
+ "errorCount": 2,
400
+ "getErrors": [Function],
401
+ "getErrorsByGroup": [Function],
402
+ "getWarnings": [Function],
403
+ "getWarningsByGroup": [Function],
404
+ "groups": {},
405
+ "hasErrors": [Function],
406
+ "hasErrorsByGroup": [Function],
407
+ "hasWarnings": [Function],
408
+ "hasWarningsByGroup": [Function],
409
+ "isValid": [Function],
410
+ "isValidByGroup": [Function],
411
+ "suiteName": undefined,
412
+ "testCount": 2,
413
+ "tests": {
414
+ "field_1": {
415
+ "errorCount": 1,
416
+ "errors": [],
417
+ "testCount": 1,
418
+ "valid": false,
419
+ "warnCount": 0,
420
+ "warnings": [],
421
+ },
422
+ "field_2": {
423
+ "errorCount": 1,
424
+ "errors": [],
425
+ "testCount": 1,
426
+ "valid": false,
427
+ "warnCount": 0,
428
+ "warnings": [],
429
+ },
430
+ "field_3": {
431
+ "errorCount": 0,
432
+ "errors": [],
433
+ "testCount": 0,
434
+ "valid": false,
435
+ "warnCount": 0,
436
+ "warnings": [],
437
+ },
438
+ },
439
+ "valid": false,
440
+ "warnCount": 0,
441
+ }
442
+ `;
443
+
444
+ exports[`include There is an \`onlyd\` field include().when() \`when\` param is a function Callback evaluation Should evaluate per test run 1`] = `
445
+ {
446
+ "done": [Function],
447
+ "errorCount": 2,
448
+ "getErrors": [Function],
449
+ "getErrorsByGroup": [Function],
450
+ "getWarnings": [Function],
451
+ "getWarningsByGroup": [Function],
452
+ "groups": {},
453
+ "hasErrors": [Function],
454
+ "hasErrorsByGroup": [Function],
455
+ "hasWarnings": [Function],
456
+ "hasWarningsByGroup": [Function],
457
+ "isValid": [Function],
458
+ "isValidByGroup": [Function],
459
+ "suiteName": undefined,
460
+ "testCount": 2,
461
+ "tests": {
462
+ "field_1": {
463
+ "errorCount": 2,
464
+ "errors": [],
465
+ "testCount": 2,
466
+ "valid": false,
467
+ "warnCount": 0,
468
+ "warnings": [],
469
+ },
470
+ },
471
+ "valid": false,
472
+ "warnCount": 0,
473
+ }
474
+ `;
475
+
476
+ exports[`include There is an \`onlyd\` field include().when() \`when\` param is a function when returning\`false\` Should skip run included field 1`] = `
477
+ {
478
+ "done": [Function],
479
+ "errorCount": 1,
480
+ "getErrors": [Function],
481
+ "getErrorsByGroup": [Function],
482
+ "getWarnings": [Function],
483
+ "getWarningsByGroup": [Function],
484
+ "groups": {},
485
+ "hasErrors": [Function],
486
+ "hasErrorsByGroup": [Function],
487
+ "hasWarnings": [Function],
488
+ "hasWarningsByGroup": [Function],
489
+ "isValid": [Function],
490
+ "isValidByGroup": [Function],
491
+ "suiteName": undefined,
492
+ "testCount": 1,
493
+ "tests": {
494
+ "field_1": {
495
+ "errorCount": 1,
496
+ "errors": [],
497
+ "testCount": 1,
498
+ "valid": false,
499
+ "warnCount": 0,
500
+ "warnings": [],
501
+ },
502
+ "field_2": {
503
+ "errorCount": 0,
504
+ "errors": [],
505
+ "testCount": 0,
506
+ "valid": false,
507
+ "warnCount": 0,
508
+ "warnings": [],
509
+ },
510
+ "field_3": {
511
+ "errorCount": 0,
512
+ "errors": [],
513
+ "testCount": 0,
514
+ "valid": false,
515
+ "warnCount": 0,
516
+ "warnings": [],
517
+ },
518
+ },
519
+ "valid": false,
520
+ "warnCount": 0,
521
+ }
522
+ `;
523
+
524
+ exports[`include There is an \`onlyd\` field include().when() \`when\` param is a function when returning \`true\` Should run included field 1`] = `
525
+ {
526
+ "done": [Function],
527
+ "errorCount": 2,
528
+ "getErrors": [Function],
529
+ "getErrorsByGroup": [Function],
530
+ "getWarnings": [Function],
531
+ "getWarningsByGroup": [Function],
532
+ "groups": {},
533
+ "hasErrors": [Function],
534
+ "hasErrorsByGroup": [Function],
535
+ "hasWarnings": [Function],
536
+ "hasWarningsByGroup": [Function],
537
+ "isValid": [Function],
538
+ "isValidByGroup": [Function],
539
+ "suiteName": undefined,
540
+ "testCount": 2,
541
+ "tests": {
542
+ "field_1": {
543
+ "errorCount": 1,
544
+ "errors": [],
545
+ "testCount": 1,
546
+ "valid": false,
547
+ "warnCount": 0,
548
+ "warnings": [],
549
+ },
550
+ "field_2": {
551
+ "errorCount": 1,
552
+ "errors": [],
553
+ "testCount": 1,
554
+ "valid": false,
555
+ "warnCount": 0,
556
+ "warnings": [],
557
+ },
558
+ "field_3": {
559
+ "errorCount": 0,
560
+ "errors": [],
561
+ "testCount": 0,
562
+ "valid": false,
563
+ "warnCount": 0,
564
+ "warnings": [],
565
+ },
566
+ },
567
+ "valid": false,
568
+ "warnCount": 0,
569
+ }
570
+ `;
571
+
572
+ exports[`include There is an \`onlyd\` field include().when() \`when\` param is a string \`when\` param is a name of a non-included field Should avoid running the included field 1`] = `
573
+ {
574
+ "done": [Function],
575
+ "errorCount": 1,
576
+ "getErrors": [Function],
577
+ "getErrorsByGroup": [Function],
578
+ "getWarnings": [Function],
579
+ "getWarningsByGroup": [Function],
580
+ "groups": {},
581
+ "hasErrors": [Function],
582
+ "hasErrorsByGroup": [Function],
583
+ "hasWarnings": [Function],
584
+ "hasWarningsByGroup": [Function],
585
+ "isValid": [Function],
586
+ "isValidByGroup": [Function],
587
+ "suiteName": undefined,
588
+ "testCount": 1,
589
+ "tests": {
590
+ "field_1": {
591
+ "errorCount": 1,
592
+ "errors": [],
593
+ "testCount": 1,
594
+ "valid": false,
595
+ "warnCount": 0,
596
+ "warnings": [],
597
+ },
598
+ "field_2": {
599
+ "errorCount": 0,
600
+ "errors": [],
601
+ "testCount": 0,
602
+ "valid": false,
603
+ "warnCount": 0,
604
+ "warnings": [],
605
+ },
606
+ "field_3": {
607
+ "errorCount": 0,
608
+ "errors": [],
609
+ "testCount": 0,
610
+ "valid": false,
611
+ "warnCount": 0,
612
+ "warnings": [],
613
+ },
614
+ },
615
+ "valid": false,
616
+ "warnCount": 0,
617
+ }
618
+ `;
619
+
620
+ exports[`include There is an \`onlyd\` field include().when() \`when\` param is a string \`when\` param is a name of a skipped field Should avoid running the included field 1`] = `
621
+ {
622
+ "done": [Function],
623
+ "errorCount": 1,
624
+ "getErrors": [Function],
625
+ "getErrorsByGroup": [Function],
626
+ "getWarnings": [Function],
627
+ "getWarningsByGroup": [Function],
628
+ "groups": {},
629
+ "hasErrors": [Function],
630
+ "hasErrorsByGroup": [Function],
631
+ "hasWarnings": [Function],
632
+ "hasWarningsByGroup": [Function],
633
+ "isValid": [Function],
634
+ "isValidByGroup": [Function],
635
+ "suiteName": undefined,
636
+ "testCount": 1,
637
+ "tests": {
638
+ "field_1": {
639
+ "errorCount": 1,
640
+ "errors": [],
641
+ "testCount": 1,
642
+ "valid": false,
643
+ "warnCount": 0,
644
+ "warnings": [],
645
+ },
646
+ "field_2": {
647
+ "errorCount": 0,
648
+ "errors": [],
649
+ "testCount": 0,
650
+ "valid": false,
651
+ "warnCount": 0,
652
+ "warnings": [],
653
+ },
654
+ "field_3": {
655
+ "errorCount": 0,
656
+ "errors": [],
657
+ "testCount": 0,
658
+ "valid": false,
659
+ "warnCount": 0,
660
+ "warnings": [],
661
+ },
662
+ },
663
+ "valid": false,
664
+ "warnCount": 0,
665
+ }
666
+ `;
667
+
668
+ exports[`include There is an \`onlyd\` field include().when() \`when\` param is a string \`when\` param is a name of an onlyd field Should run included field along with the onlyd field 1`] = `
669
+ {
670
+ "done": [Function],
671
+ "errorCount": 2,
672
+ "getErrors": [Function],
673
+ "getErrorsByGroup": [Function],
674
+ "getWarnings": [Function],
675
+ "getWarningsByGroup": [Function],
676
+ "groups": {},
677
+ "hasErrors": [Function],
678
+ "hasErrorsByGroup": [Function],
679
+ "hasWarnings": [Function],
680
+ "hasWarningsByGroup": [Function],
681
+ "isValid": [Function],
682
+ "isValidByGroup": [Function],
683
+ "suiteName": undefined,
684
+ "testCount": 2,
685
+ "tests": {
686
+ "field_1": {
687
+ "errorCount": 1,
688
+ "errors": [],
689
+ "testCount": 1,
690
+ "valid": false,
691
+ "warnCount": 0,
692
+ "warnings": [],
693
+ },
694
+ "field_2": {
695
+ "errorCount": 1,
696
+ "errors": [],
697
+ "testCount": 1,
698
+ "valid": false,
699
+ "warnCount": 0,
700
+ "warnings": [],
701
+ },
702
+ "field_3": {
703
+ "errorCount": 0,
704
+ "errors": [],
705
+ "testCount": 0,
706
+ "valid": false,
707
+ "warnCount": 0,
708
+ "warnings": [],
709
+ },
710
+ },
711
+ "valid": false,
712
+ "warnCount": 0,
713
+ }
714
+ `;
715
+
716
+ exports[`include When no \`skip\` or \`only\` include has no effect 1`] = `
717
+ {
718
+ "done": [Function],
719
+ "errorCount": 2,
720
+ "getErrors": [Function],
721
+ "getErrorsByGroup": [Function],
722
+ "getWarnings": [Function],
723
+ "getWarningsByGroup": [Function],
724
+ "groups": {},
725
+ "hasErrors": [Function],
726
+ "hasErrorsByGroup": [Function],
727
+ "hasWarnings": [Function],
728
+ "hasWarningsByGroup": [Function],
729
+ "isValid": [Function],
730
+ "isValidByGroup": [Function],
731
+ "suiteName": undefined,
732
+ "testCount": 2,
733
+ "tests": {
734
+ "field_1": {
735
+ "errorCount": 1,
736
+ "errors": [],
737
+ "testCount": 1,
738
+ "valid": false,
739
+ "warnCount": 0,
740
+ "warnings": [],
741
+ },
742
+ "field_2": {
743
+ "errorCount": 1,
744
+ "errors": [],
745
+ "testCount": 1,
746
+ "valid": false,
747
+ "warnCount": 0,
748
+ "warnings": [],
749
+ },
750
+ },
751
+ "valid": false,
752
+ "warnCount": 0,
753
+ }
754
+ `;
755
+
756
+ exports[`include When no \`skip\` or \`only\` include().when has no effect 1`] = `
757
+ {
758
+ "done": [Function],
759
+ "errorCount": 2,
760
+ "getErrors": [Function],
761
+ "getErrorsByGroup": [Function],
762
+ "getWarnings": [Function],
763
+ "getWarningsByGroup": [Function],
764
+ "groups": {},
765
+ "hasErrors": [Function],
766
+ "hasErrorsByGroup": [Function],
767
+ "hasWarnings": [Function],
768
+ "hasWarningsByGroup": [Function],
769
+ "isValid": [Function],
770
+ "isValidByGroup": [Function],
771
+ "suiteName": undefined,
772
+ "testCount": 2,
773
+ "tests": {
774
+ "field_1": {
775
+ "errorCount": 1,
776
+ "errors": [],
777
+ "testCount": 1,
778
+ "valid": false,
779
+ "warnCount": 0,
780
+ "warnings": [],
781
+ },
782
+ "field_2": {
783
+ "errorCount": 1,
784
+ "errors": [],
785
+ "testCount": 1,
786
+ "valid": false,
787
+ "warnCount": 0,
788
+ "warnings": [],
789
+ },
790
+ },
791
+ "valid": false,
792
+ "warnCount": 0,
793
+ }
794
+ `;