Skip to main content

Mocky Balboa and Nuxt

How to use Mocky Balboa with Nuxt.

Supported versions

≥ 3.0.0

Installation

pnpm add -D @mocky-balboa/nuxt

Usage

Everything needed to setup the integration is included in the @mocky-balboa/nuxt module.

// nuxt.config.ts

export default defineNuxtConfig({
// Enabled defaults to true
modules: [["@mocky-balboa/nuxt", { enabled: true }]],
});

Make sure enabled is set to false for your production like environments. You only want to enable the module when running your tests.

Now run your Nuxt application as you normally would, either via build and server or dev.

Module options API reference