Skip to content

Commit 2220bb3

Browse files
committed
fix(browser): don't get stuck after the manual page refresh
Fixes #5822
1 parent 5ebb3ab commit 2220bb3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

packages/browser/src/client/orchestrator.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,6 @@ client.ws.addEventListener('open', async () => {
9696

9797
debug('test files', testFiles.join(', '))
9898

99-
// TODO: fail tests suite because no tests found?
100-
if (!testFiles.length) {
101-
await done()
102-
return
103-
}
104-
10599
const runningFiles = new Set<string>(testFiles)
106100

107101
channel.addEventListener('message', async (e: MessageEvent<IframeChannelEvent>): Promise<void> => {
@@ -168,7 +162,10 @@ client.ws.addEventListener('open', async () => {
168162
}
169163
})
170164

171-
await createTesters(testFiles)
165+
// if page was refreshed, there will be no test files
166+
// createTesters will be called again when tests are running in the UI
167+
if (testFiles.length)
168+
await createTesters(testFiles)
172169
})
173170

174171
async function createTesters(testFiles: string[]) {

0 commit comments

Comments
 (0)