fix(test-utils): use beforeAll for setup (#3696)

This commit is contained in:
Anthony Fu 2022-03-16 18:47:02 +08:00 committed by GitHub
parent d1e23ea773
commit e67ed55de3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@ import type { TestHooks } from '../types'
export default async function setupVitest (hooks: TestHooks) { export default async function setupVitest (hooks: TestHooks) {
const vitest = await import('vitest') const vitest = await import('vitest')
vitest.test('setup nuxt', hooks.setup, 60000) vitest.beforeAll(hooks.setup, 60000)
vitest.beforeEach(hooks.beforeEach) vitest.beforeEach(hooks.beforeEach)
vitest.afterEach(hooks.afterEach) vitest.afterEach(hooks.afterEach)
vitest.afterAll(hooks.afterAll) vitest.afterAll(hooks.afterAll)