jest-serializer-vue

WebJar for jest-serializer-vue

License

License

MIT
Categories

Categories

Jest Data Databases
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

jest-serializer-vue
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

jest-serializer-vue
WebJar for jest-serializer-vue
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/eddyerburgh/jest-serializer-vue

Download jest-serializer-vue

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/jest-serializer-vue/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>jest-serializer-vue</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/jest-serializer-vue/
implementation 'org.webjars.npm:jest-serializer-vue:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/jest-serializer-vue/
implementation ("org.webjars.npm:jest-serializer-vue:1.0.0")
'org.webjars.npm:jest-serializer-vue:jar:1.0.0'
<dependency org="org.webjars.npm" name="jest-serializer-vue" rev="1.0.0">
  <artifact name="jest-serializer-vue" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='jest-serializer-vue', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "jest-serializer-vue" % "1.0.0"
[org.webjars.npm/jest-serializer-vue "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : pretty jar [2.0.0]

Project Modules

There are no modules declared in this project.

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

Versions

Version
1.0.0