ota-meshi / test-snapshot

A snapshot testing library similar to jest-snapshot.

Repository from Github https://github.comota-meshi/test-snapshotRepository from Github https://github.comota-meshi/test-snapshot

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();
});

About

A snapshot testing library similar to jest-snapshot.

License:MIT License


Languages

Language:TypeScript 88.2%Language:JavaScript 11.8%