徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
yangsai c3106436ae 20141015 5 months ago
..
.circleci 20141015 5 months ago
test 20141015 5 months ago
.babelrc 20141015 5 months ago
.eslintrc 20141015 5 months ago
CHANGELOG.md 20141015 5 months ago
LICENSE 20141015 5 months ago
README.md 20141015 5 months ago
index.js 20141015 5 months ago
jest.config.json 20141015 5 months ago
package.json 20141015 5 months ago

README.md

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 { shallow } from 'avoriaz'
import Basic from './Basic.vue'
import { createRenderer } from 'vue-server-renderer'

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