Skip to content

Commit

Permalink
add enzyme snapshot serializer to jest
Browse files Browse the repository at this point in the history
converts all the existing
`expect(component.debug()).toMatchSnapshot()`
to:
`expect(component).toMatchSnapshot()`
which creates more detailed and more diff-able snapshots

test plan:
- specs pass -- this only affects js test code

Change-Id: Ib6dbcc1e3f87e61a251e4635dc68353aca57aeac
Reviewed-on: https://gerrit.instructure.com/167651
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
  • Loading branch information
Jon Willesen authored and Jon Willesen committed Oct 9, 2018
1 parent a6f2e6f commit 3fddcf9
Show file tree
Hide file tree
Showing 35 changed files with 5,430 additions and 584 deletions.
2 changes: 1 addition & 1 deletion app/jsx/actAs/__tests__/ActAsModal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const props = {
describe('ActAsModal', () => {
it('renders with panda svgs, user avatar, table, and proceed button present', () => {
const wrapper = shallow(<ActAsModal {...props} />)
// expect(wrapper).toMatchSnapshot() // Coming soon.... (need to get enzyme upgraded to 3.x first)
expect(wrapper).toMatchSnapshot()

const mask = wrapper.find(ActAsMask)
const panda = wrapper.find(ActAsPanda)
Expand Down
Loading

0 comments on commit 3fddcf9

Please sign in to comment.