Socket
Book a DemoInstallSign in
Socket

@mocky-balboa/nuxt

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mocky-balboa/nuxt

Nuxt integration for Mocky Balboa. Mock your full-stack network requests in your test suites.

latest
Source
npmnpm
Version
1.0.9
Version published
Maintainers
1
Created
Source

🥊 Mocky Balboa

A network mocking library for your SSR applications. Fixture http network requests on your server-side application for browser automation testing without having to modify your application logic.

Getting started

Check out the documentation to get started.

Server integrations

Browser automation tool support

Custom integrations

Don't see your framework? Create a custom server integration or a custom client integration. Alternatively submit a pull request or report an issue to add support for your framework.

Examples

Playwright example

import { expect } from "@playwright/test";
import { test } from "@mocky-balboa/playwright";

test("a route that performs server and client network requests", async ({ page, mocky }) => {
  // Mocks the request on both the client and the server
  mocky.route("**/api/endpoint", (route) => {
    return route.fulfill({
      status: 200,
      body: JSON.stringify({ message: "Hello, World!" }),
      headers: { "Content-Type": "application/json" },
    });
  }, {
    // Optionally configure the route
    // type: "both" to mock on both client and server (default behaviour)
    // type: "server-only" to mock on the server only
    // type: "client-only" to mock on the client only
  });

  await page.goto("http://localhost:3000");
});

More examples

See examples for example projects.

Contributing

See contributing for more information.

Keywords

nuxt

FAQs

Package last updated on 03 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts