Package detail

@ota-meshi/test-snapshot

ota-meshi614MIT1.1.0

A snapshot testing library similar to jest-snapshot.

test-snapshot, mocha, snapshot

readme

test-snapshot

A snapshot testing library similar to jest-snapshot.

🚀 Features

💿 Installation

npm install -D @ota-meshi/test-snapshot

📖 Usage

For example, when used with mocha:

import { expect } from "@ota-meshi/test-snapshot";

it("foo", () => {
  expect({ foo: "bar" }).toMatchSnapshot();
});

For example, when used with mocha and chai:

import { use, expect } from "chai"
import { chaiPlugin } from "@ota-meshi/test-snapshot/chai";

use(chaiPlugin);

it("foo", () => {
  expect({ foo: "bar" }).toMatchSnapshot();
});