File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/jest-dev-server/src Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export type Config = {
5656 * Action to take if the port is already used.
5757 * @default "ask"
5858 */
59- usedPortAction ?: "ask" | "error" | "ignore" ;
59+ usedPortAction ?: "ask" | "error" | "ignore" | "kill" ;
6060 /**
6161 * Options to pass to [`wait-on`](https://www.npmjs.com/package/wait-on).
6262 * @see https://www.npmjs.com/package/wait-on#options
@@ -170,7 +170,10 @@ const checkIsPortBusy = async (config: Config): Promise<boolean> => {
170170
171171type UsedPortHandler = ( port : number ) => boolean | Promise < boolean > ;
172172
173- const usedPortHandlers : Record < string , UsedPortHandler > = {
173+ const usedPortHandlers : Record <
174+ NonNullable < Config [ "usedPortAction" ] > ,
175+ UsedPortHandler
176+ > = {
174177 error : ( port ) => {
175178 throw new JestDevServerError ( `Port ${ port } is in use` , {
176179 code : ERROR_PORT_USED ,
You can’t perform that action at this time.
0 commit comments