test-inventory 0.9.1 → 0.10.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.
@@ -0,0 +1,1291 @@
1
+ {
2
+ "$id": "https://huldoser.github.io/test-inventory/schema/diff-v1.json",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "$ref": "#/definitions/InventoryDiff",
5
+ "definitions": {
6
+ "InventoryDiff": {
7
+ "type": "object",
8
+ "properties": {
9
+ "schemaVersion": {
10
+ "type": "number",
11
+ "const": 1
12
+ },
13
+ "tool": {
14
+ "$ref": "#/definitions/Tool"
15
+ },
16
+ "framework": {
17
+ "$ref": "#/definitions/Framework"
18
+ },
19
+ "beforeToolVersion": {
20
+ "type": "string"
21
+ },
22
+ "afterToolVersion": {
23
+ "type": "string"
24
+ },
25
+ "hashesComparable": {
26
+ "type": "boolean"
27
+ },
28
+ "summary": {
29
+ "type": "object",
30
+ "properties": {
31
+ "added": {
32
+ "type": "number"
33
+ },
34
+ "removed": {
35
+ "type": "number"
36
+ },
37
+ "moved": {
38
+ "type": "number"
39
+ },
40
+ "renamed": {
41
+ "type": "number"
42
+ },
43
+ "bodyChanged": {
44
+ "type": "number"
45
+ },
46
+ "dependenciesChanged": {
47
+ "type": "number"
48
+ },
49
+ "newlySkipped": {
50
+ "type": "number"
51
+ },
52
+ "reEnabled": {
53
+ "type": "number"
54
+ },
55
+ "stateChanged": {
56
+ "type": "number"
57
+ },
58
+ "tagsChanged": {
59
+ "type": "number"
60
+ },
61
+ "metadataChanged": {
62
+ "type": "number"
63
+ },
64
+ "changed": {
65
+ "type": "number"
66
+ },
67
+ "unchanged": {
68
+ "type": "number"
69
+ }
70
+ },
71
+ "required": [
72
+ "added",
73
+ "removed",
74
+ "moved",
75
+ "renamed",
76
+ "bodyChanged",
77
+ "dependenciesChanged",
78
+ "newlySkipped",
79
+ "reEnabled",
80
+ "stateChanged",
81
+ "tagsChanged",
82
+ "metadataChanged",
83
+ "changed",
84
+ "unchanged"
85
+ ],
86
+ "description": "Category counts overlap; changed counts matched tests, while unchanged counts matches with no changes."
87
+ },
88
+ "changes": {
89
+ "type": "array",
90
+ "items": {
91
+ "$ref": "#/definitions/TestChange"
92
+ }
93
+ },
94
+ "clones": {
95
+ "type": "object",
96
+ "properties": {
97
+ "before": {
98
+ "type": "array",
99
+ "items": {
100
+ "$ref": "#/definitions/CloneGroup"
101
+ }
102
+ },
103
+ "after": {
104
+ "type": "array",
105
+ "items": {
106
+ "$ref": "#/definitions/CloneGroup"
107
+ }
108
+ }
109
+ },
110
+ "required": [
111
+ "before",
112
+ "after"
113
+ ]
114
+ },
115
+ "warnings": {
116
+ "type": "array",
117
+ "items": {
118
+ "type": "string"
119
+ }
120
+ }
121
+ },
122
+ "required": [
123
+ "schemaVersion",
124
+ "tool",
125
+ "framework",
126
+ "beforeToolVersion",
127
+ "afterToolVersion",
128
+ "hashesComparable",
129
+ "summary",
130
+ "changes",
131
+ "clones",
132
+ "warnings"
133
+ ],
134
+ "description": "The deterministic comparison of two saved inventories."
135
+ },
136
+ "Tool": {
137
+ "type": "object",
138
+ "properties": {
139
+ "name": {
140
+ "type": "string",
141
+ "const": "test-inventory"
142
+ },
143
+ "version": {
144
+ "type": "string",
145
+ "description": "Version of test-inventory that produced the output."
146
+ }
147
+ },
148
+ "required": [
149
+ "name",
150
+ "version"
151
+ ]
152
+ },
153
+ "Framework": {
154
+ "anyOf": [
155
+ {
156
+ "type": "string",
157
+ "enum": [
158
+ "playwright",
159
+ "vitest",
160
+ "jest",
161
+ "mocha",
162
+ "jasmine",
163
+ "cypress",
164
+ "webdriverio",
165
+ "node",
166
+ "bun"
167
+ ]
168
+ },
169
+ {
170
+ "type": "string"
171
+ }
172
+ ]
173
+ },
174
+ "TestChange": {
175
+ "anyOf": [
176
+ {
177
+ "type": "object",
178
+ "properties": {
179
+ "match": {
180
+ "$ref": "#/definitions/MatchMethod"
181
+ },
182
+ "before": {
183
+ "$ref": "#/definitions/TestRecord"
184
+ },
185
+ "after": {
186
+ "$ref": "#/definitions/TestRecord"
187
+ },
188
+ "kinds": {
189
+ "type": "array",
190
+ "items": {
191
+ "$ref": "#/definitions/ChangeKind"
192
+ }
193
+ },
194
+ "changedFields": {
195
+ "type": "array",
196
+ "items": {
197
+ "type": "string",
198
+ "enum": [
199
+ "id",
200
+ "bodyHash",
201
+ "dependencyHash",
202
+ "dependencies",
203
+ "hasUnfollowedDependencies",
204
+ "suiteId",
205
+ "parentTestId",
206
+ "suitePath",
207
+ "relativeFilePath",
208
+ "fileName",
209
+ "lineStart",
210
+ "lineEnd",
211
+ "columnStart",
212
+ "columnEnd",
213
+ "declaredAt",
214
+ "title",
215
+ "titleWithoutTags",
216
+ "hasDynamicTitle",
217
+ "fullName",
218
+ "isTypeTest",
219
+ "state",
220
+ "isActive",
221
+ "isSkipped",
222
+ "isFixme",
223
+ "isTodo",
224
+ "isExpectedToFail",
225
+ "isNotLoaded",
226
+ "isOnly",
227
+ "isConditional",
228
+ "condition",
229
+ "reason",
230
+ "hasDynamicReason",
231
+ "stateSource",
232
+ "stateLine",
233
+ "isParallel",
234
+ "isSerial",
235
+ "tags",
236
+ "annotations",
237
+ "comments",
238
+ "locks",
239
+ "meta",
240
+ "hooks",
241
+ "timeout",
242
+ "isSlow",
243
+ "slowCondition",
244
+ "retries",
245
+ "retryDelay",
246
+ "retryCondition",
247
+ "repeats",
248
+ "timeoutSource",
249
+ "retriesSource",
250
+ "repeatsSource",
251
+ "timeoutConfigText",
252
+ "retriesConfigText",
253
+ "repeatsConfigText",
254
+ "fixtures",
255
+ "expectCount",
256
+ "expectedAssertions",
257
+ "expectsAssertions",
258
+ "hasEmptyBody",
259
+ "steps",
260
+ "isBenchmark",
261
+ "isParameterized",
262
+ "caseCount",
263
+ "caseIndex",
264
+ "isInLoop",
265
+ "isInCondition",
266
+ "isInFunction",
267
+ "projects"
268
+ ]
269
+ },
270
+ "description": "Changed record keys, excluding locations and ids. Hashes are included only when comparable."
271
+ }
272
+ },
273
+ "required": [
274
+ "after",
275
+ "before",
276
+ "changedFields",
277
+ "kinds",
278
+ "match"
279
+ ]
280
+ },
281
+ {
282
+ "type": "object",
283
+ "properties": {
284
+ "match": {
285
+ "type": "null"
286
+ },
287
+ "before": {
288
+ "$ref": "#/definitions/TestRecord"
289
+ },
290
+ "after": {
291
+ "type": "null"
292
+ },
293
+ "kinds": {
294
+ "type": "array",
295
+ "items": {
296
+ "$ref": "#/definitions/ChangeKind"
297
+ }
298
+ },
299
+ "changedFields": {
300
+ "type": "array",
301
+ "items": {
302
+ "type": "string",
303
+ "enum": [
304
+ "id",
305
+ "bodyHash",
306
+ "dependencyHash",
307
+ "dependencies",
308
+ "hasUnfollowedDependencies",
309
+ "suiteId",
310
+ "parentTestId",
311
+ "suitePath",
312
+ "relativeFilePath",
313
+ "fileName",
314
+ "lineStart",
315
+ "lineEnd",
316
+ "columnStart",
317
+ "columnEnd",
318
+ "declaredAt",
319
+ "title",
320
+ "titleWithoutTags",
321
+ "hasDynamicTitle",
322
+ "fullName",
323
+ "isTypeTest",
324
+ "state",
325
+ "isActive",
326
+ "isSkipped",
327
+ "isFixme",
328
+ "isTodo",
329
+ "isExpectedToFail",
330
+ "isNotLoaded",
331
+ "isOnly",
332
+ "isConditional",
333
+ "condition",
334
+ "reason",
335
+ "hasDynamicReason",
336
+ "stateSource",
337
+ "stateLine",
338
+ "isParallel",
339
+ "isSerial",
340
+ "tags",
341
+ "annotations",
342
+ "comments",
343
+ "locks",
344
+ "meta",
345
+ "hooks",
346
+ "timeout",
347
+ "isSlow",
348
+ "slowCondition",
349
+ "retries",
350
+ "retryDelay",
351
+ "retryCondition",
352
+ "repeats",
353
+ "timeoutSource",
354
+ "retriesSource",
355
+ "repeatsSource",
356
+ "timeoutConfigText",
357
+ "retriesConfigText",
358
+ "repeatsConfigText",
359
+ "fixtures",
360
+ "expectCount",
361
+ "expectedAssertions",
362
+ "expectsAssertions",
363
+ "hasEmptyBody",
364
+ "steps",
365
+ "isBenchmark",
366
+ "isParameterized",
367
+ "caseCount",
368
+ "caseIndex",
369
+ "isInLoop",
370
+ "isInCondition",
371
+ "isInFunction",
372
+ "projects"
373
+ ]
374
+ },
375
+ "description": "Changed record keys, excluding locations and ids. Hashes are included only when comparable."
376
+ }
377
+ },
378
+ "required": [
379
+ "after",
380
+ "before",
381
+ "changedFields",
382
+ "kinds",
383
+ "match"
384
+ ]
385
+ },
386
+ {
387
+ "type": "object",
388
+ "properties": {
389
+ "match": {
390
+ "type": "null"
391
+ },
392
+ "before": {
393
+ "type": "null"
394
+ },
395
+ "after": {
396
+ "$ref": "#/definitions/TestRecord"
397
+ },
398
+ "kinds": {
399
+ "type": "array",
400
+ "items": {
401
+ "$ref": "#/definitions/ChangeKind"
402
+ }
403
+ },
404
+ "changedFields": {
405
+ "type": "array",
406
+ "items": {
407
+ "type": "string",
408
+ "enum": [
409
+ "id",
410
+ "bodyHash",
411
+ "dependencyHash",
412
+ "dependencies",
413
+ "hasUnfollowedDependencies",
414
+ "suiteId",
415
+ "parentTestId",
416
+ "suitePath",
417
+ "relativeFilePath",
418
+ "fileName",
419
+ "lineStart",
420
+ "lineEnd",
421
+ "columnStart",
422
+ "columnEnd",
423
+ "declaredAt",
424
+ "title",
425
+ "titleWithoutTags",
426
+ "hasDynamicTitle",
427
+ "fullName",
428
+ "isTypeTest",
429
+ "state",
430
+ "isActive",
431
+ "isSkipped",
432
+ "isFixme",
433
+ "isTodo",
434
+ "isExpectedToFail",
435
+ "isNotLoaded",
436
+ "isOnly",
437
+ "isConditional",
438
+ "condition",
439
+ "reason",
440
+ "hasDynamicReason",
441
+ "stateSource",
442
+ "stateLine",
443
+ "isParallel",
444
+ "isSerial",
445
+ "tags",
446
+ "annotations",
447
+ "comments",
448
+ "locks",
449
+ "meta",
450
+ "hooks",
451
+ "timeout",
452
+ "isSlow",
453
+ "slowCondition",
454
+ "retries",
455
+ "retryDelay",
456
+ "retryCondition",
457
+ "repeats",
458
+ "timeoutSource",
459
+ "retriesSource",
460
+ "repeatsSource",
461
+ "timeoutConfigText",
462
+ "retriesConfigText",
463
+ "repeatsConfigText",
464
+ "fixtures",
465
+ "expectCount",
466
+ "expectedAssertions",
467
+ "expectsAssertions",
468
+ "hasEmptyBody",
469
+ "steps",
470
+ "isBenchmark",
471
+ "isParameterized",
472
+ "caseCount",
473
+ "caseIndex",
474
+ "isInLoop",
475
+ "isInCondition",
476
+ "isInFunction",
477
+ "projects"
478
+ ]
479
+ },
480
+ "description": "Changed record keys, excluding locations and ids. Hashes are included only when comparable."
481
+ }
482
+ },
483
+ "required": [
484
+ "after",
485
+ "before",
486
+ "changedFields",
487
+ "kinds",
488
+ "match"
489
+ ]
490
+ }
491
+ ],
492
+ "description": "One addition, removal or changed test. Locations and records come from the saved scans unchanged."
493
+ },
494
+ "MatchMethod": {
495
+ "description": "The evidence that two records identify the same test; null for an addition or removal. Other values may be added in later releases.",
496
+ "anyOf": [
497
+ {
498
+ "type": "string",
499
+ "enum": [
500
+ "id",
501
+ "bodyHash",
502
+ "bodyHashAndFile",
503
+ "bodyHashAndSuite",
504
+ "bodyHashAndDependencies"
505
+ ]
506
+ },
507
+ {
508
+ "type": "string"
509
+ }
510
+ ]
511
+ },
512
+ "TestRecord": {
513
+ "type": "object",
514
+ "properties": {
515
+ "id": {
516
+ "type": "string",
517
+ "pattern": "^[0-9a-f]{16}$",
518
+ "description": "Derived from the file path, the describe titles, the title and its position among tests with the same title."
519
+ },
520
+ "bodyHash": {
521
+ "anyOf": [
522
+ {
523
+ "type": "string",
524
+ "pattern": "^[0-9a-f]{16}$"
525
+ },
526
+ {
527
+ "type": "null"
528
+ }
529
+ ],
530
+ "description": "Hash of the test body, ignoring whitespace and comments; null when the test has no body."
531
+ },
532
+ "dependencyHash": {
533
+ "type": "string",
534
+ "pattern": "^[0-9a-f]{16}$",
535
+ "description": "Hash of everything the test runs in the project: its call, the hooks, options and code of the file and of every describe around it, and the functions, classes, constants and modules these use, followed through imports. Ignores whitespace and comments. Installed packages are not in it."
536
+ },
537
+ "dependencies": {
538
+ "type": "array",
539
+ "items": {
540
+ "type": "string"
541
+ },
542
+ "description": "The files that went into `dependencyHash`, the test's own included, sorted, with `/` separators."
543
+ },
544
+ "hasUnfollowedDependencies": {
545
+ "type": "boolean",
546
+ "description": "Something the test reaches couldn't be followed, so a change there doesn't change `dependencyHash`."
547
+ },
548
+ "suiteId": {
549
+ "anyOf": [
550
+ {
551
+ "type": "string",
552
+ "pattern": "^[0-9a-f]{16}$"
553
+ },
554
+ {
555
+ "type": "null"
556
+ }
557
+ ],
558
+ "description": "The nearest describe; null outside any describe."
559
+ },
560
+ "parentTestId": {
561
+ "anyOf": [
562
+ {
563
+ "type": "string",
564
+ "pattern": "^[0-9a-f]{16}$"
565
+ },
566
+ {
567
+ "type": "null"
568
+ }
569
+ ],
570
+ "description": "The test whose body declares this one as a subtest, which `node:test` runs while it runs that test; null for every other test."
571
+ },
572
+ "suitePath": {
573
+ "type": "array",
574
+ "items": {
575
+ "type": "string"
576
+ },
577
+ "description": "Titles of the describes around the test, and of the tests a subtest is declared in, outermost first."
578
+ },
579
+ "relativeFilePath": {
580
+ "type": "string",
581
+ "description": "Path from the project root, with `/` separators."
582
+ },
583
+ "fileName": {
584
+ "type": "string"
585
+ },
586
+ "lineStart": {
587
+ "type": "integer",
588
+ "minimum": 1
589
+ },
590
+ "lineEnd": {
591
+ "type": "integer",
592
+ "minimum": 1
593
+ },
594
+ "columnStart": {
595
+ "type": "integer",
596
+ "minimum": 1,
597
+ "description": "In UTF-16 code units."
598
+ },
599
+ "columnEnd": {
600
+ "type": "integer",
601
+ "minimum": 1,
602
+ "description": "In UTF-16 code units."
603
+ },
604
+ "declaredAt": {
605
+ "anyOf": [
606
+ {
607
+ "$ref": "#/definitions/DeclaredAt"
608
+ },
609
+ {
610
+ "type": "null"
611
+ }
612
+ ],
613
+ "description": "Where a helper imported from another file writes the test; the record's location is then the call that registers it. Null for code written in the scanned file."
614
+ },
615
+ "title": {
616
+ "type": "string",
617
+ "description": "As the runner shows it, tags included."
618
+ },
619
+ "titleWithoutTags": {
620
+ "type": "string",
621
+ "description": "`title` with `@tag` words removed and spaces tidied."
622
+ },
623
+ "hasDynamicTitle": {
624
+ "type": "boolean",
625
+ "description": "The title could not be resolved to a fixed string, so `title` holds its source text."
626
+ },
627
+ "fullName": {
628
+ "type": "string",
629
+ "description": "`suitePath` and `title` joined with \" > \"."
630
+ },
631
+ "isTypeTest": {
632
+ "type": "boolean",
633
+ "description": "Declared in a Vitest type test file (`*.test-d.ts`, `*.spec-d.ts`)."
634
+ },
635
+ "state": {
636
+ "$ref": "#/definitions/TestState"
637
+ },
638
+ "isActive": {
639
+ "type": "boolean"
640
+ },
641
+ "isSkipped": {
642
+ "type": "boolean"
643
+ },
644
+ "isFixme": {
645
+ "type": "boolean"
646
+ },
647
+ "isTodo": {
648
+ "type": "boolean"
649
+ },
650
+ "isExpectedToFail": {
651
+ "type": "boolean"
652
+ },
653
+ "isNotLoaded": {
654
+ "type": "boolean",
655
+ "description": "The runner did not load this test, possibly because its describe failed; a diagnostic at `stateLine` says why."
656
+ },
657
+ "isOnly": {
658
+ "type": "boolean",
659
+ "description": "The test is selected by a `.only`, following the runner's focus rules."
660
+ },
661
+ "isConditional": {
662
+ "type": "boolean",
663
+ "description": "The state applies only when a condition holds, as with `test.skip(condition)` or `skipIf`."
664
+ },
665
+ "condition": {
666
+ "type": [
667
+ "string",
668
+ "null"
669
+ ],
670
+ "description": "Source text of the condition, shortened when long; null when unconditional."
671
+ },
672
+ "reason": {
673
+ "type": [
674
+ "string",
675
+ "null"
676
+ ]
677
+ },
678
+ "hasDynamicReason": {
679
+ "type": "boolean",
680
+ "description": "The reason could not be worked out to a string, so `reason` holds its source text."
681
+ },
682
+ "stateSource": {
683
+ "anyOf": [
684
+ {
685
+ "$ref": "#/definitions/StateSource"
686
+ },
687
+ {
688
+ "type": "null"
689
+ }
690
+ ],
691
+ "description": "null for active tests."
692
+ },
693
+ "stateLine": {
694
+ "anyOf": [
695
+ {
696
+ "type": "integer",
697
+ "minimum": 1
698
+ },
699
+ {
700
+ "type": "null"
701
+ }
702
+ ],
703
+ "description": "The line that sets the state; null for active tests."
704
+ },
705
+ "isParallel": {
706
+ "type": "boolean",
707
+ "description": "Both `isParallel` and `isSerial` false means the framework's default mode."
708
+ },
709
+ "isSerial": {
710
+ "type": "boolean"
711
+ },
712
+ "tags": {
713
+ "type": "array",
714
+ "items": {
715
+ "type": "string"
716
+ },
717
+ "description": "From the test and every describe around it, outermost first, without duplicates."
718
+ },
719
+ "annotations": {
720
+ "type": "array",
721
+ "items": {
722
+ "$ref": "#/definitions/Annotation"
723
+ }
724
+ },
725
+ "comments": {
726
+ "type": "array",
727
+ "items": {
728
+ "type": "string"
729
+ },
730
+ "description": "Comment lines directly above the test. By default only filled for tests that are not active."
731
+ },
732
+ "locks": {
733
+ "type": "array",
734
+ "items": {
735
+ "type": "string"
736
+ },
737
+ "description": "From the test, its describes and the `test.describe.configure()` calls around it. Playwright only."
738
+ },
739
+ "meta": {
740
+ "anyOf": [
741
+ {
742
+ "type": "object",
743
+ "additionalProperties": {
744
+ "$ref": "#/definitions/MetaValue"
745
+ }
746
+ },
747
+ {
748
+ "type": "null"
749
+ }
750
+ ],
751
+ "description": "Merged from the describes and the test. Vitest only; literal values only."
752
+ },
753
+ "hooks": {
754
+ "$ref": "#/definitions/HookCounts",
755
+ "description": "Every hook that runs around the test: those of the file and of each describe around it."
756
+ },
757
+ "timeout": {
758
+ "anyOf": [
759
+ {
760
+ "type": "integer",
761
+ "minimum": 0
762
+ },
763
+ {
764
+ "type": "null"
765
+ }
766
+ ],
767
+ "description": "In milliseconds: the last `test.setTimeout()` in the body or a `beforeEach`, otherwise the nearest describe or file that sets one, otherwise the config. Null when none sets it, so the runner's default applies."
768
+ },
769
+ "isSlow": {
770
+ "type": "boolean",
771
+ "description": "Playwright `test.slow()` applies: the runner triples the timeout."
772
+ },
773
+ "slowCondition": {
774
+ "type": [
775
+ "string",
776
+ "null"
777
+ ],
778
+ "description": "Source text of the condition of the `test.slow()` that applies; null when unconditional or not slow."
779
+ },
780
+ "retries": {
781
+ "anyOf": [
782
+ {
783
+ "type": "integer",
784
+ "minimum": 0
785
+ },
786
+ {
787
+ "type": "null"
788
+ }
789
+ ],
790
+ "description": "How many times the runner retries the test when it fails; null when the file sets none."
791
+ },
792
+ "retryDelay": {
793
+ "anyOf": [
794
+ {
795
+ "type": "integer",
796
+ "minimum": 0
797
+ },
798
+ {
799
+ "type": "null"
800
+ }
801
+ ],
802
+ "description": "Milliseconds between retries: Vitest's from the `retry` object (4.1), Jest's from `waitBeforeRetry` of `jest.retryTimes()` (30.0); null otherwise."
803
+ },
804
+ "retryCondition": {
805
+ "type": [
806
+ "string",
807
+ "null"
808
+ ],
809
+ "description": "Vitest only: source text of the `retry` object's `condition`, a RegExp or a function."
810
+ },
811
+ "repeats": {
812
+ "anyOf": [
813
+ {
814
+ "type": "integer",
815
+ "minimum": 0
816
+ },
817
+ {
818
+ "type": "null"
819
+ }
820
+ ],
821
+ "description": "How many times the runner runs the test again after the first run: Vitest's or Bun's `repeats`, or Playwright's `repeatEach` from the config less one."
822
+ },
823
+ "timeoutSource": {
824
+ "anyOf": [
825
+ {
826
+ "$ref": "#/definitions/SettingSource"
827
+ },
828
+ {
829
+ "type": "null"
830
+ }
831
+ ],
832
+ "description": "Where `timeout` comes from; null when nothing sets it. A null `timeout` from the config means the config sets it, but its projects set different values or the value depends on a condition, as in `process.env.CI ? 2 : 0`."
833
+ },
834
+ "retriesSource": {
835
+ "anyOf": [
836
+ {
837
+ "$ref": "#/definitions/SettingSource"
838
+ },
839
+ {
840
+ "type": "null"
841
+ }
842
+ ],
843
+ "description": "Where `retries`, `retryDelay` and `retryCondition` come from, read as `timeoutSource` is."
844
+ },
845
+ "repeatsSource": {
846
+ "anyOf": [
847
+ {
848
+ "$ref": "#/definitions/SettingSource"
849
+ },
850
+ {
851
+ "type": "null"
852
+ }
853
+ ],
854
+ "description": "Where `repeats` comes from, read as `timeoutSource` is."
855
+ },
856
+ "timeoutConfigText": {
857
+ "type": [
858
+ "string",
859
+ "null"
860
+ ],
861
+ "description": "The config's source text for `timeout` when the config sets it under a condition, as in `process.env.CI ? 60_000 : 30_000`, shortened when long; null otherwise."
862
+ },
863
+ "retriesConfigText": {
864
+ "type": [
865
+ "string",
866
+ "null"
867
+ ],
868
+ "description": "The config's source text for `retries`, read as `timeoutConfigText` is."
869
+ },
870
+ "repeatsConfigText": {
871
+ "type": [
872
+ "string",
873
+ "null"
874
+ ],
875
+ "description": "The config's source text for `repeats`, Playwright's `repeatEach`, read as `timeoutConfigText` is."
876
+ },
877
+ "fixtures": {
878
+ "type": "array",
879
+ "items": {
880
+ "type": "string"
881
+ },
882
+ "description": "Names the test function takes from its context, then those of the `beforeEach`, `afterEach` and `aroundEach` hooks around it, once each. Vitest's own context keys, such as `expect` and `task`, are left out."
883
+ },
884
+ "expectCount": {
885
+ "type": "integer",
886
+ "minimum": 0,
887
+ "description": "Calls of `expect()`, `expect.soft()` and `expect.poll()` written in the body, each counted once."
888
+ },
889
+ "expectedAssertions": {
890
+ "anyOf": [
891
+ {
892
+ "type": "integer",
893
+ "minimum": 0
894
+ },
895
+ {
896
+ "type": "null"
897
+ }
898
+ ],
899
+ "description": "Vitest `expect.assertions(n)` in the body."
900
+ },
901
+ "expectsAssertions": {
902
+ "type": "boolean",
903
+ "description": "Vitest `expect.hasAssertions()` in the body."
904
+ },
905
+ "hasEmptyBody": {
906
+ "type": "boolean",
907
+ "description": "The test function has no statements, comments aside."
908
+ },
909
+ "steps": {
910
+ "type": "array",
911
+ "items": {
912
+ "$ref": "#/definitions/Step"
913
+ },
914
+ "description": "Playwright `test.step()` and `test.step.skip()` calls in the body, in source order."
915
+ },
916
+ "isBenchmark": {
917
+ "type": "boolean",
918
+ "description": "Vitest 5 benchmark: in a benchmark file, or using the `bench` fixture. Plain `vitest` doesn't run it."
919
+ },
920
+ "isParameterized": {
921
+ "type": "boolean",
922
+ "description": "Declared with `.each` or `.for`, or inside a describe declared with them, so the runner repeats it."
923
+ },
924
+ "caseCount": {
925
+ "anyOf": [
926
+ {
927
+ "type": "integer",
928
+ "minimum": 0
929
+ },
930
+ {
931
+ "type": "null"
932
+ }
933
+ ],
934
+ "description": "How many times the runner repeats the test: the cases of its own table times those of each describe table and the passes of each loop around it. Null when the scan can't work out a table or a loop's values, or the test is neither parameterized nor in a loop."
935
+ },
936
+ "caseIndex": {
937
+ "anyOf": [
938
+ {
939
+ "type": "integer",
940
+ "minimum": 0
941
+ },
942
+ {
943
+ "type": "null"
944
+ }
945
+ ],
946
+ "description": "With `expandCases`, which case of its own table, or pass of the innermost loop around it inside its describe, the test is, from 0, as Vitest's `%#` counts; null without `expandCases`, or when the test isn't one of several. The case of a describe table or loop around the describe is the describe's `caseIndex`."
947
+ },
948
+ "isInLoop": {
949
+ "type": "boolean",
950
+ "description": "Declared inside a loop, `forEach` or `map`."
951
+ },
952
+ "isInCondition": {
953
+ "type": "boolean",
954
+ "description": "Declared inside `if`, `?:`, `&&`, `switch` or a `catch` block."
955
+ },
956
+ "isInFunction": {
957
+ "type": "boolean",
958
+ "description": "Declared inside a plain function."
959
+ },
960
+ "projects": {
961
+ "anyOf": [
962
+ {
963
+ "type": "array",
964
+ "items": {
965
+ "type": "string"
966
+ }
967
+ },
968
+ {
969
+ "type": "null"
970
+ }
971
+ ],
972
+ "description": "Names of the projects that run the test, of the config its file uses, after each project's files and Playwright's `grep` and `grepInvert`. `[]` when no project runs it; null when there is no config, or the scan can't tell."
973
+ }
974
+ },
975
+ "required": [
976
+ "id",
977
+ "bodyHash",
978
+ "dependencyHash",
979
+ "dependencies",
980
+ "hasUnfollowedDependencies",
981
+ "suiteId",
982
+ "parentTestId",
983
+ "suitePath",
984
+ "relativeFilePath",
985
+ "fileName",
986
+ "lineStart",
987
+ "lineEnd",
988
+ "columnStart",
989
+ "columnEnd",
990
+ "declaredAt",
991
+ "title",
992
+ "titleWithoutTags",
993
+ "hasDynamicTitle",
994
+ "fullName",
995
+ "isTypeTest",
996
+ "state",
997
+ "isActive",
998
+ "isSkipped",
999
+ "isFixme",
1000
+ "isTodo",
1001
+ "isExpectedToFail",
1002
+ "isNotLoaded",
1003
+ "isOnly",
1004
+ "isConditional",
1005
+ "condition",
1006
+ "reason",
1007
+ "hasDynamicReason",
1008
+ "stateSource",
1009
+ "stateLine",
1010
+ "isParallel",
1011
+ "isSerial",
1012
+ "tags",
1013
+ "annotations",
1014
+ "comments",
1015
+ "locks",
1016
+ "meta",
1017
+ "hooks",
1018
+ "timeout",
1019
+ "isSlow",
1020
+ "slowCondition",
1021
+ "retries",
1022
+ "retryDelay",
1023
+ "retryCondition",
1024
+ "repeats",
1025
+ "timeoutSource",
1026
+ "retriesSource",
1027
+ "repeatsSource",
1028
+ "timeoutConfigText",
1029
+ "retriesConfigText",
1030
+ "repeatsConfigText",
1031
+ "fixtures",
1032
+ "expectCount",
1033
+ "expectedAssertions",
1034
+ "expectsAssertions",
1035
+ "hasEmptyBody",
1036
+ "steps",
1037
+ "isBenchmark",
1038
+ "isParameterized",
1039
+ "caseCount",
1040
+ "caseIndex",
1041
+ "isInLoop",
1042
+ "isInCondition",
1043
+ "isInFunction",
1044
+ "projects"
1045
+ ],
1046
+ "description": "A test, with the effective values the runner applies, including those inherited from its describes."
1047
+ },
1048
+ "DeclaredAt": {
1049
+ "type": "object",
1050
+ "properties": {
1051
+ "relativeFilePath": {
1052
+ "type": "string",
1053
+ "description": "The helper's file, from the project root."
1054
+ },
1055
+ "lineStart": {
1056
+ "type": "integer",
1057
+ "minimum": 1
1058
+ },
1059
+ "columnStart": {
1060
+ "type": "integer",
1061
+ "minimum": 1,
1062
+ "description": "In UTF-16 code units."
1063
+ }
1064
+ },
1065
+ "required": [
1066
+ "relativeFilePath",
1067
+ "lineStart",
1068
+ "columnStart"
1069
+ ]
1070
+ },
1071
+ "TestState": {
1072
+ "description": "The state the runner applies to a test, after describes and file-level calls are taken into account. `notLoaded`: the runner refuses to load the file, so none of its tests run. Other values may be added in later releases.",
1073
+ "anyOf": [
1074
+ {
1075
+ "type": "string",
1076
+ "enum": [
1077
+ "active",
1078
+ "skip",
1079
+ "fixme",
1080
+ "todo",
1081
+ "expectedToFail",
1082
+ "notLoaded"
1083
+ ]
1084
+ },
1085
+ {
1086
+ "type": "string"
1087
+ }
1088
+ ]
1089
+ },
1090
+ "StateSource": {
1091
+ "description": "Where a test's state is set: on the test, on a describe around it, at file level, or by a Vitest tag the config defines. Other values may be added in later releases.",
1092
+ "anyOf": [
1093
+ {
1094
+ "type": "string",
1095
+ "enum": [
1096
+ "test",
1097
+ "suite",
1098
+ "file",
1099
+ "config"
1100
+ ]
1101
+ },
1102
+ {
1103
+ "type": "string"
1104
+ }
1105
+ ]
1106
+ },
1107
+ "Annotation": {
1108
+ "type": "object",
1109
+ "properties": {
1110
+ "type": {
1111
+ "type": "string"
1112
+ },
1113
+ "description": {
1114
+ "type": [
1115
+ "string",
1116
+ "null"
1117
+ ]
1118
+ },
1119
+ "lineStart": {
1120
+ "type": "integer",
1121
+ "minimum": 1
1122
+ }
1123
+ },
1124
+ "required": [
1125
+ "type",
1126
+ "description",
1127
+ "lineStart"
1128
+ ]
1129
+ },
1130
+ "MetaValue": {
1131
+ "anyOf": [
1132
+ {
1133
+ "type": "string"
1134
+ },
1135
+ {
1136
+ "type": "number"
1137
+ },
1138
+ {
1139
+ "type": "boolean"
1140
+ },
1141
+ {
1142
+ "type": "null"
1143
+ },
1144
+ {
1145
+ "type": "array",
1146
+ "items": {
1147
+ "$ref": "#/definitions/MetaValue"
1148
+ }
1149
+ },
1150
+ {
1151
+ "type": "object",
1152
+ "additionalProperties": {
1153
+ "$ref": "#/definitions/MetaValue"
1154
+ }
1155
+ }
1156
+ ]
1157
+ },
1158
+ "HookCounts": {
1159
+ "type": "object",
1160
+ "properties": {
1161
+ "beforeAll": {
1162
+ "type": "integer",
1163
+ "minimum": 0
1164
+ },
1165
+ "beforeEach": {
1166
+ "type": "integer",
1167
+ "minimum": 0
1168
+ },
1169
+ "afterEach": {
1170
+ "type": "integer",
1171
+ "minimum": 0
1172
+ },
1173
+ "afterAll": {
1174
+ "type": "integer",
1175
+ "minimum": 0
1176
+ },
1177
+ "aroundEach": {
1178
+ "type": "integer",
1179
+ "minimum": 0,
1180
+ "description": "Vitest only."
1181
+ },
1182
+ "aroundAll": {
1183
+ "type": "integer",
1184
+ "minimum": 0,
1185
+ "description": "Vitest only."
1186
+ }
1187
+ },
1188
+ "required": [
1189
+ "beforeAll",
1190
+ "beforeEach",
1191
+ "afterEach",
1192
+ "afterAll",
1193
+ "aroundEach",
1194
+ "aroundAll"
1195
+ ],
1196
+ "description": "How many hooks of each kind are registered, including by helper functions called there."
1197
+ },
1198
+ "SettingSource": {
1199
+ "description": "Where a test's run setting comes from: the test, a describe around it, the file, or the config its file uses. Other values may be added in later releases.",
1200
+ "anyOf": [
1201
+ {
1202
+ "type": "string",
1203
+ "enum": [
1204
+ "test",
1205
+ "suite",
1206
+ "file",
1207
+ "config"
1208
+ ]
1209
+ },
1210
+ {
1211
+ "type": "string"
1212
+ }
1213
+ ]
1214
+ },
1215
+ "Step": {
1216
+ "type": "object",
1217
+ "properties": {
1218
+ "title": {
1219
+ "type": "string",
1220
+ "description": "The title, or its source text when it can't be worked out."
1221
+ },
1222
+ "hasDynamicTitle": {
1223
+ "type": "boolean"
1224
+ },
1225
+ "lineStart": {
1226
+ "type": "integer",
1227
+ "minimum": 1
1228
+ },
1229
+ "depth": {
1230
+ "type": "integer",
1231
+ "minimum": 0,
1232
+ "description": "0 for a step directly in the test, 1 for a step inside it, and so on."
1233
+ },
1234
+ "isSkipped": {
1235
+ "type": "boolean",
1236
+ "description": "Declared with `test.step.skip()`."
1237
+ }
1238
+ },
1239
+ "required": [
1240
+ "title",
1241
+ "hasDynamicTitle",
1242
+ "lineStart",
1243
+ "depth",
1244
+ "isSkipped"
1245
+ ]
1246
+ },
1247
+ "ChangeKind": {
1248
+ "description": "Changes a comparison can report; one matched test can have several. Other values may be added in later releases.",
1249
+ "anyOf": [
1250
+ {
1251
+ "type": "string",
1252
+ "enum": [
1253
+ "added",
1254
+ "removed",
1255
+ "moved",
1256
+ "renamed",
1257
+ "bodyChanged",
1258
+ "dependenciesChanged",
1259
+ "newlySkipped",
1260
+ "reEnabled",
1261
+ "stateChanged",
1262
+ "tagsChanged",
1263
+ "metadataChanged"
1264
+ ]
1265
+ },
1266
+ {
1267
+ "type": "string"
1268
+ }
1269
+ ]
1270
+ },
1271
+ "CloneGroup": {
1272
+ "type": "object",
1273
+ "properties": {
1274
+ "bodyHash": {
1275
+ "type": "string"
1276
+ },
1277
+ "testIds": {
1278
+ "type": "array",
1279
+ "items": {
1280
+ "type": "string"
1281
+ }
1282
+ }
1283
+ },
1284
+ "required": [
1285
+ "bodyHash",
1286
+ "testIds"
1287
+ ],
1288
+ "description": "Tests with identical syntax-tree bodies, including trivial bodies; this does not prove they test the same thing."
1289
+ }
1290
+ }
1291
+ }