Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed May 8, 2024
1 parent b55f63b commit e5f9f1d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/vitest/src/node/cli/cli-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ export async function startVitest(
})

try {
if (ctx.config.blob.length)
await ctx.blob()
if (ctx.config.mergeReports)
await ctx.mergeReports()
else if (ctx.config.standalone)
await ctx.init()
else
Expand Down
6 changes: 2 additions & 4 deletions packages/vitest/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,8 @@ export function resolveConfig(
if (resolved.standalone && !resolved.watch)
throw new Error(`Vitest standalone mode requires --watch`)

resolved.blob = toArray(resolved.blob || [])

if (resolved.blob.length && resolved.watch)
throw new Error(`Cannot merge blobs with --watch enabled`)
if (resolved.mergeReports && resolved.watch)
throw new Error(`Cannot merge reports with --watch enabled`)

if (resolved.maxWorkers)
resolved.maxWorkers = Number(resolved.maxWorkers)
Expand Down
2 changes: 1 addition & 1 deletion packages/vitest/src/node/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ export class Vitest {
return Promise.all(this.projects.map(w => w.initBrowserProvider()))
}

async blob() {
async mergeReports() {
const blobs = await readBlobs(this.config.mergeReports)

if (!blobs.length)
Expand Down

0 comments on commit e5f9f1d

Please sign in to comment.