Nuxt/packages/test-utils/src/setup/jest.ts
pooya parsa c53c7360b7
feat: @nuxt/test-utils (#2952)
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
2022-02-11 14:22:58 +01:00

14 lines
425 B
TypeScript

import type { TestHooks } from '../types'
export default function setupJest (hooks: TestHooks) {
// TODO: add globals existing check to provide better error message
// @ts-expect-error jest types
test('setup', hooks.setup, 60000)
// @ts-expect-error jest types
beforeEach(hooks.beforeEach)
// @ts-expect-error jest types
afterEach(hooks.afterEach)
// @ts-expect-error jest types
afterAll(hooks.afterAll)
}