0.1.0 • Published 5 years ago

enzyme-snapshot-diff v0.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

enzyme-snapshot-diff

Build Status tested with jest styled with prettier All Contributors

snapshot-diff for enzyme

Install

$ npm install enzyme-snapshot-diff

Usage

import { mount } from 'enzyme'
import enzymeDiffSnapshot from 'enzyme-snapshot-diff'

test('snapshot', () => {
  const a = mount(<div>hello</div>)
  const b = mount(<div>world</div>)
  expect(enzymeDiffSnapshot(a, b)).toMatchInlineSnapshot(`
"Snapshot Diff:
- First value
+ Second value

  <div>
-   hello
+   world
  </div>"
`)
})

Contributors

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © akameco