2
2
3
3
type LiteralUnion < T extends U , U = string > = T | ( U & { zz_IGNORE_ME ?: never } ) ;
4
4
5
+ type BlobReporterOptions = { outputDir ?: string ; fileName ?: string } ;
6
+ type ListReporterOptions = { printSteps ?: boolean } ;
7
+ type JUnitReporterOptions = {
8
+ outputFile ?: string ;
9
+ stripANSIControlSequences ?: boolean ;
10
+ includeProjectInTestName ?: boolean ;
11
+ } ;
12
+ type JsonReporterOptions = { outputFile ?: string } ;
13
+ type HtmlReporterOptions = {
14
+ outputFolder ?: string ;
15
+ open ?: 'always' | 'never' | 'on-failure' ;
16
+ host ?: string ;
17
+ port ?: number ;
18
+ attachmentsBaseURL ?: string ;
19
+ title ?: string ;
20
+ noSnippets ?: boolean ;
21
+ } ;
22
+
5
23
type ReporterDescription = Readonly <
6
24
| [ 'blob' ]
7
- | [ 'blob' , { outputDir ?: string ; fileName ?: string } ]
25
+ | [ 'blob' , BlobReporterOptions ]
8
26
| [ 'dot' ]
9
27
| [ 'line' ]
10
28
| [ 'list' ]
11
- | [ 'list' , { printSteps ?: boolean } ]
29
+ | [ 'list' , ListReporterOptions ]
12
30
| [ 'github' ]
13
31
| [ 'junit' ]
14
- | [ 'junit' , { outputFile ?: string ; stripANSIControlSequences ?: boolean ; includeProjectInTestName ?: boolean } ]
32
+ | [ 'junit' , JUnitReporterOptions ]
15
33
| [ 'json' ]
16
- | [ 'json' , { outputFile ?: string } ]
34
+ | [ 'json' , JsonReporterOptions ]
17
35
| [ 'html' ]
18
- | [
19
- 'html' ,
20
- {
21
- outputFolder ?: string ;
22
- open ?: 'always' | 'never' | 'on-failure' ;
23
- host ?: string ;
24
- port ?: number ;
25
- attachmentsBaseURL ?: string ;
26
- } ,
27
- ]
36
+ | [ 'html' , HtmlReporterOptions ]
28
37
| [ 'null' ]
29
38
| [ string ]
30
39
| [ string , any ]
@@ -43,4 +52,6 @@ export type PlaywrightTestConfig = {
43
52
reporter ?:
44
53
| LiteralUnion < 'dot' | 'line' | 'list' | 'junit' | 'html' | 'json' | 'github' | 'null' , string >
45
54
| ReporterDescription [ ] ;
55
+ globalSetup ?: string | Array < string > ;
56
+ globalTeardown ?: string | Array < string > ;
46
57
} ;
0 commit comments