chore(extension): use free port (#735)
This commit is contained in:
parent
da8a244f33
commit
c72d0320f4
3 changed files with 5 additions and 5 deletions
|
|
@ -217,7 +217,7 @@ async function injectCdpPort(browserConfig: FullConfig['browser']) {
|
|||
(browserConfig.launchOptions as any).cdpPort = await findFreePort();
|
||||
}
|
||||
|
||||
async function findFreePort() {
|
||||
async function findFreePort(): Promise<number> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const server = net.createServer();
|
||||
server.listen(0, () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue