Skip to content

API > wxt/testing > WxtVitest

Function: WxtVitest()

WxtVitest(inlineConfig?): Promise<vite.PluginOption[]>

Vite plugin that configures Vitest with everything required to test a WXT extension, based on the <root>/wxt.config.ts

ts
// vitest.config.ts
import { defineConfig } from 'vitest/config';
import { WxtVitest } from 'wxt/testing';

export default defineConfig({
  plugins: [WxtVitest()],
});

Parameters

inlineConfig?: InlineConfig

Customize WXT's config for testing. Any config specified here overrides the config from your wxt.config.ts file.

Source

packages/wxt/src/testing/wxt-vitest-plugin.ts:29


Generated using typedoc-plugin-markdown and TypeDoc