Skip to content

Commit

Permalink
chore: lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed May 21, 2022
1 parent d28cbf0 commit a23fb58
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/vitest/src/node/pool.ts
Expand Up @@ -8,8 +8,8 @@ import { createBirpc } from 'birpc'
import type { RawSourceMap } from 'vite-node'
import type { WorkerContext, WorkerRPC } from '../types'
import { distDir } from '../constants'
import type { Vitest } from './core'
import { AggregateError } from '../utils'
import type { Vitest } from './core'

export type RunWithFiles = (files: string[], invalidates?: string[]) => Promise<void>

Expand Down Expand Up @@ -44,7 +44,8 @@ export function createFakePool(ctx: Vitest): WorkerPool {

try {
await worker[name](data, { transferList: [workerPort] })
} finally {
}
finally {
port.close()
workerPort.close()
}
Expand Down Expand Up @@ -96,16 +97,16 @@ export function createWorkerPool(ctx: Vitest): WorkerPool {

try {
await pool.run(data, { transferList: [workerPort], name })
} finally {
}
finally {
port.close()
workerPort.close()
}
}))

const errors = results.filter((r): r is PromiseRejectedResult => r.status === 'rejected').map(r => r.reason)
if (errors.length > 0) {
if (errors.length > 0)
throw new AggregateError(errors)
}
}
}

Expand Down

0 comments on commit a23fb58

Please sign in to comment.