2.0.5 • Published 1 month ago

@japa/snapshot v2.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@japa/snapshot

Snapshot testing plugin for Japa

gh-workflow-image npm-image license-image

Snapshot testing plugin for Japa. This plugin allows you to write snapshot tests for your application.

Complete API documentation

Installation

Install the package from the npm registry as follows:

npm i @japa/snapshot

pnpm i @japa/snapshot

yarn add @japa/snapshot

Usage

You can use this package with the @japa/runner as follows.

import { snapshot } from '@japa/snapshot'
import { configure } from '@japa/runner'

configure({
  plugins: [snapshot()],
})

Once done, you will be able to use the 2 new matchers added, either on expect or assert

test('test title', ({ expect, assert }) => {
  // with @japa/assert
  assert.snapshot('1').match()

  // with @japa/expect
  expect('1').toMatchSnapshot()
})
2.0.5

1 month ago

2.0.4

5 months ago

2.0.3

6 months ago

2.0.2

6 months ago

2.0.0-2

8 months ago

2.0.0-1

11 months ago

2.0.1

6 months ago

2.0.0

7 months ago

2.0.0-0

11 months ago

1.0.1-3

11 months ago

1.0.1-2

11 months ago

1.0.1-1

11 months ago

1.0.1-0

11 months ago