jest-serializer-vue
A jest serializer for Vue snapshots
Last updated 3 years ago by eddyerburgh .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install jest-serializer-vue 
SYNC missed versions from official npm registry.

jest-serializer-vue

Jest Vue snapshot serializer

Installation

npm install --save-dev jest-serializer-vue

Usage

You need to tell Jest to use the serializer. Add this to your Jest config:

"snapshotSerializers": [
  "<rootDir>/node_modules/jest-serializer-vue"
]

And your snapshot tests will be pretty printed ????

import { shallowMount } from '@vue/test-utils'
import Basic from './Basic.vue'

describe('Basic.vue', () => {
  it('renders correctly', () => {
    const wrapper = shallowMount(Basic)
    expect(wrapper).toMatchSnapshot()
  })
})

Current Tags

  • 3.1.0                                ...           latest (3 years ago)

9 Versions

  • 3.1.0                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.2                                ...           8 years ago
  • 2.0.1                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
  • 0.3.0                                ...           8 years ago
  • 0.2.0                                ...           9 years ago
  • 0.1.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 1
Dependencies (1)

Copyright 2013 - present © cnpmjs.org | Home |