[READ-ONLY] Mirror of https://github.com/vitest-dev/vitest. Next generation testing framework powered by Vite. vitest.dev
test testing-tools vite
12

Configure Feed

Select the types of activity you want to include in your feed.

chore: .

userquin (Nov 9, 2025, 6:05 PM +0100) 3bb13149 60a80908

+11 -5
+11 -5
packages/vitest/src/node/pools/browser.ts
··· 248 248 if (this.project.browser!.provider.name === 'preview') { 249 249 const sessionId = this.project.vitest._browserSessions.findSessionByBrowser(this.project) 250 250 if (sessionId) { 251 - // readySessions should have only the sessionId 251 + const sessionsCreated = this.readySessions.size === 0 252 + // readySessions we have only one sessionId 252 253 if (this.readySessions.size > 0 && this._queue.length > 0) { 253 254 this.readySessions.delete(sessionId) 254 - this.runNextTest(method, sessionId) 255 - return this._promise 256 255 } 257 - this.runNextTest(method, sessionId) 258 - debug?.('all sessions are created') 256 + if (this._queue.length > 0) { 257 + this.runNextTest(method, sessionId) 258 + if (sessionsCreated) { 259 + debug?.('all sessions are created') 260 + } 261 + } 262 + else { 263 + this._promise.resolve() 264 + } 259 265 return this._promise 260 266 } 261 267 this._promise.reject(new Error('Preview session not found when starting tests.'))