Skip to content

Commit b07eb66

Browse files
committed
fix: initiate browser providers in VItest <=2.1.5
Fixes #531
1 parent 835e32d commit b07eb66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/worker/vitest.ts

+3
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ export class Vitest implements VitestMethods {
113113
}
114114

115115
public async runTests(specsOrPaths: SerializedTestSpecification[] | string[] | undefined, testNamePattern?: string) {
116+
// @ts-expect-error private method in Vitest <=2.1.5
117+
await this.ctx.initBrowserProviders?.()
118+
116119
const specs = await this.resolveTestSpecs(specsOrPaths)
117120

118121
await this.runTestFiles(specs, testNamePattern, !specs)

0 commit comments

Comments
 (0)