From d6adff77925a52bd86fc0f679f0bc5dd5cd0cc54 Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Sun, 31 Oct 2021 10:06:28 -0800 Subject: [PATCH] fix(html): include html into the reporter types (#9907) --- docs/src/test-advanced-js.md | 2 +- packages/playwright-test/types/test.d.ts | 3 ++- utils/generate_types/overrides-test.d.ts | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/src/test-advanced-js.md b/docs/src/test-advanced-js.md index 94b82f2c54..cef14e8525 100644 --- a/docs/src/test-advanced-js.md +++ b/docs/src/test-advanced-js.md @@ -38,7 +38,7 @@ These options would be typically different between local development and CI oper - `'failures-only'` - only preserve output for failed tests. - `projects: Project[]` - Multiple [projects](#projects) configuration. - `quiet: boolean` - Whether to suppress stdout and stderr from the tests. -- `reporter: 'list' | 'line' | 'dot' | 'json' | 'junit' | 'github'` - The reporter to use. See [reporters](./test-reporters.md) for details. +- `reporter: 'list' | 'line' | 'dot' | 'json' | 'junit' | 'github' | 'html' | 'null'` - The reporter to use. See [reporters](./test-reporters.md) for details. - `reportSlowTests: { max: number, threshold: number } | null` - Whether to report slow tests. When `null`, slow tests are not reported. Otherwise, tests that took more than `threshold` milliseconds are reported as slow, but no more than `max` number of them. Passing zero as `max` reports all slow tests that exceed the threshold. - `shard: { total: number, current: number } | null` - [Shard](./test-parallel.md#shard-tests-between-multiple-machines) information. - `updateSnapshots: boolean` - Whether to update expected snapshots with the actual results produced by the test run. diff --git a/packages/playwright-test/types/test.d.ts b/packages/playwright-test/types/test.d.ts index f1ebd8ed34..7aa848c008 100644 --- a/packages/playwright-test/types/test.d.ts +++ b/packages/playwright-test/types/test.d.ts @@ -27,6 +27,7 @@ export type ReporterDescription = ['github'] | ['junit'] | ['junit', { outputFile?: string, stripANSIControlSequences?: boolean }] | ['json'] | ['json', { outputFile?: string }] | + ['html'] | ['html', { outputFolder?: string, open?: 'always' | 'never' | 'on-failure' }] | ['null'] | [string] | [string, any]; @@ -530,7 +531,7 @@ interface TestConfig { * ``` * */ - reporter?: LiteralUnion<'list'|'dot'|'line'|'github'|'json'|'junit'|'null', string> | ReporterDescription[]; + reporter?: LiteralUnion<'list'|'dot'|'line'|'github'|'json'|'junit'|'null'|'html', string> | ReporterDescription[]; /** * Whether to report slow tests. Pass `null` to disable this feature. * diff --git a/utils/generate_types/overrides-test.d.ts b/utils/generate_types/overrides-test.d.ts index c34943ef6b..52ea4bd6b8 100644 --- a/utils/generate_types/overrides-test.d.ts +++ b/utils/generate_types/overrides-test.d.ts @@ -26,6 +26,7 @@ export type ReporterDescription = ['github'] | ['junit'] | ['junit', { outputFile?: string, stripANSIControlSequences?: boolean }] | ['json'] | ['json', { outputFile?: string }] | + ['html'] | ['html', { outputFolder?: string, open?: 'always' | 'never' | 'on-failure' }] | ['null'] | [string] | [string, any]; @@ -109,7 +110,7 @@ interface TestConfig { preserveOutput?: PreserveOutput; projects?: Project[]; quiet?: boolean; - reporter?: LiteralUnion<'list'|'dot'|'line'|'github'|'json'|'junit'|'null', string> | ReporterDescription[]; + reporter?: LiteralUnion<'list'|'dot'|'line'|'github'|'json'|'junit'|'null'|'html', string> | ReporterDescription[]; reportSlowTests?: ReportSlowTests; shard?: Shard; updateSnapshots?: UpdateSnapshots;