11import React from 'react' ;
22import { shallow } from 'enzyme' ;
3- import toJson from 'enzyme-to-json' ;
43
54import { RangeField } from 'app/components/forms' ;
65
76describe ( 'RangeField' , function ( ) {
87 describe ( 'render()' , function ( ) {
98 it ( 'renders' , function ( ) {
109 let wrapper = shallow ( < RangeField name = "fieldName" /> ) ;
11- expect ( toJson ( wrapper ) ) . toMatchSnapshot ( ) ;
10+ expect ( wrapper ) . toMatchSnapshot ( ) ;
1211 } ) ;
1312
1413 it ( 'renders with optional attributes' , function ( ) {
@@ -22,12 +21,12 @@ describe('RangeField', function() {
2221 allowedValues = { [ 1 , 2 , 3 ] }
2322 />
2423 ) ;
25- expect ( toJson ( wrapper ) ) . toMatchSnapshot ( ) ;
24+ expect ( wrapper ) . toMatchSnapshot ( ) ;
2625 } ) ;
2726
2827 it ( 'renders with value' , function ( ) {
2928 let wrapper = shallow ( < RangeField name = "fieldName" value = { 2 } /> ) ;
30- expect ( toJson ( wrapper ) ) . toMatchSnapshot ( ) ;
29+ expect ( wrapper ) . toMatchSnapshot ( ) ;
3130 } ) ;
3231
3332 it ( 'renders with form context' , function ( ) {
@@ -41,7 +40,7 @@ describe('RangeField', function() {
4140 }
4241 }
4342 } ) ;
44- expect ( toJson ( wrapper ) ) . toMatchSnapshot ( ) ;
43+ expect ( wrapper ) . toMatchSnapshot ( ) ;
4544 } ) ;
4645 } ) ;
4746} ) ;
0 commit comments