From 02284ed4aa90915d3969302d7b23f7a0b1d5abdf Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Thu, 7 Nov 2024 10:35:31 +0100 Subject: [PATCH] fix type syntax --- docs/src/test-api/class-testconfig.md | 4 +++- packages/playwright/types/test.d.ts | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/src/test-api/class-testconfig.md b/docs/src/test-api/class-testconfig.md index c428d6f405..c0ebbda670 100644 --- a/docs/src/test-api/class-testconfig.md +++ b/docs/src/test-api/class-testconfig.md @@ -619,7 +619,9 @@ export default defineConfig({ - `stdout` ?<["pipe"|"ignore"]> If `"pipe"`, it will pipe the stdout of the command to the process stdout. If `"ignore"`, it will ignore the stdout of the command. Default to `"ignore"`. - `stderr` ?<["pipe"|"ignore"]> Whether to pipe the stderr of the command to the process stderr or ignore it. Defaults to `"pipe"`. - `timeout` ?<[int]> How long to wait for the process to start up and be available in milliseconds. Defaults to 60000. - - `kill` ?<{ SIGINT: number } | { SIGTERM: number }> How to shut down the process gracefully. If unspecified, the process group is forcefully `SIGKILL`ed. If set to `{ SIGINT: 500 }`, the top process is sent a `SIGINT` signal, followed by `SIGKILL` if it doesn't exit within 500ms. You can also use `SIGTERM` instead. A `0` timeout means no `SIGKILL` will be sent. Windows doesn't support `SIGINT` and `SIGTERM` signals, so this option is ignored. + - `kill` ?<[Object]> How to shut down the process gracefully. If unspecified, the process group is forcefully `SIGKILL`ed. If set to `{ SIGINT: 500 }`, the top process is sent a `SIGINT` signal, followed by `SIGKILL` if it doesn't exit within 500ms. You can also use `SIGTERM` instead. A `0` timeout means no `SIGKILL` will be sent. Windows doesn't support `SIGINT` and `SIGTERM` signals, so this option is ignored. + - `SIGINT` <[int]> + - `SIGTERM` <[int]> - `url` ?<[string]> The url on your http server that is expected to return a 2xx, 3xx, 400, 401, 402, or 403 status code when the server is ready to accept connections. Redirects (3xx status codes) are being followed and the new location is checked. Either `port` or `url` should be specified. Launch a development web server (or multiple) during the tests. diff --git a/packages/playwright/types/test.d.ts b/packages/playwright/types/test.d.ts index 3ea1f96bad..0af2f07dc5 100644 --- a/packages/playwright/types/test.d.ts +++ b/packages/playwright/types/test.d.ts @@ -9377,7 +9377,11 @@ interface TestConfigWebServer { * You can also use `SIGTERM` instead. A `0` timeout means no `SIGKILL` will be sent. Windows doesn't support `SIGINT` * and `SIGTERM` signals, so this option is ignored. */ - kill?: { SIGINT: number }|{ SIGTERM: number }; + kill?: { + SIGINT: number; + + SIGTERM: number; + }; /** * The url on your http server that is expected to return a 2xx, 3xx, 400, 401, 402, or 403 status code when the