UNPKG

@nuxt/test-utils

Version:

Test utilities for Nuxt

16 lines (15 loc) 475 B
import { consola } from "consola"; import { createTest, exposeContextToEnv } from "@nuxt/test-utils/e2e"; //#region src/runtime/global-setup.ts const hooks = createTest(JSON.parse(process.env.NUXT_TEST_OPTIONS || "{}")); const setup = async () => { consola.info("Building Nuxt app..."); await hooks.beforeAll(); exposeContextToEnv(); consola.info("Running tests..."); }; const teardown = async () => { await hooks.afterAll(); }; //#endregion export { setup, teardown };