Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions packages/core/src/cypress/ensureRdpPort.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default function ensureRdpPort(args: string[]) {
const existing = args.find((arg) => arg.slice(0, 23) === '--remote-debugging-port')

if (existing) {
return Number(existing.split('=')[1])
}

const port = 40000 + Math.round(Math.random() * 25000)

args.push(`--remote-debugging-port=${port}`)

return port
}
1 change: 1 addition & 0 deletions packages/core/src/cypress/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as ensureRdpPort } from './ensureRdpPort'
1 change: 1 addition & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default as testWithSynpress } from './testWithSynpress'
export * from './cypress'
Loading