Make some features of nuxt-vitest available in nuxt bridge as well.
[!WARNING]
This library is in active development and you should pin the patch version before using.
Supporting nuxt bridge testing in the vitest environment.
pnpm add -D @wattanx/nuxt-bridge-vitest vitest happy-dom
# or
yarn add --dev @wattanx/nuxt-bridge-vitest vitest happy-dom
npm i -D @wattanx/nuxt-bridge-vitest vitest happy-dom
vitest.config.ts with the following content:import { defineVitestConfig } from "@wattanx/nuxt-bridge-vitest/config";
export default defineVitestConfig({
// any custom vitest config you require
});
Currently only mockNuxtImport is supported.
The basic usage is the same as @nuxt/test-utils.
https://nuxt.com/docs/getting-started/testing#mocknuxtimport
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.