Skip to content

Commit

Permalink
fix: initiate browser providers in VItest <=2.1.5
Browse files Browse the repository at this point in the history
Fixes #531
  • Loading branch information
sheremet-va committed Nov 15, 2024
1 parent 835e32d commit b07eb66
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/worker/vitest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ export class Vitest implements VitestMethods {
}

public async runTests(specsOrPaths: SerializedTestSpecification[] | string[] | undefined, testNamePattern?: string) {
// @ts-expect-error private method in Vitest <=2.1.5
await this.ctx.initBrowserProviders?.()

const specs = await this.resolveTestSpecs(specsOrPaths)

await this.runTestFiles(specs, testNamePattern, !specs)
Expand Down

0 comments on commit b07eb66

Please sign in to comment.