1- import { describe , test , expect } from 'jest'
1+ import { describe , it , test , expect } from 'jest'
22import { mount } from 'enzyme'
33import React from 'react'
44
@@ -136,20 +136,20 @@ describe('get methods return correct canvases', () => {
136136} )
137137
138138// comes after props, wrappers, and gets as it uses them all
139- describe ( 'resizing works correctly ' , ( ) => {
139+ describe ( 'canvas resizing ' , ( ) => {
140140 const wrapper = mount ( < SignatureCanvas /> )
141141 const instance = wrapper . instance ( )
142142 const canvas = instance . getCanvas ( )
143143
144- test ( 'canvas should clear on resize', ( ) => {
144+ it ( ' should clear on resize', ( ) => {
145145 instance . fromData ( dotF . data )
146146 expect ( instance . isEmpty ( ) ) . toBe ( false )
147147
148148 window . resizeTo ( 500 , 500 )
149149 expect ( instance . isEmpty ( ) ) . toBe ( true )
150150 } )
151151
152- test ( 'canvas should not clear when clearOnResize is false', ( ) => {
152+ it ( ' should not clear when clearOnResize is false', ( ) => {
153153 wrapper . setProps ( { clearOnResize : false } )
154154
155155 instance . fromData ( dotF . data )
@@ -160,23 +160,23 @@ describe('resizing works correctly', () => {
160160 } )
161161
162162 const size = { width : 100 , height : 100 }
163- test ( 'canvas should not change size if fixed width & height', ( ) => {
163+ it ( ' should not change size if fixed width & height', ( ) => {
164164 wrapper . setProps ( { canvasProps : size } )
165165 window . resizeTo ( 500 , 500 )
166166
167167 expect ( canvas . width ) . toBe ( size . width )
168168 expect ( canvas . height ) . toBe ( size . height )
169169 } )
170170
171- test ( 'canvas should change size if no width or height', ( ) => {
171+ it ( ' should change size if no width or height', ( ) => {
172172 wrapper . setProps ( { canvasProps : { } } )
173173 window . resizeTo ( 500 , 500 )
174174
175175 expect ( canvas . width ) . not . toBe ( size . width )
176176 expect ( canvas . height ) . not . toBe ( size . height )
177177 } )
178178
179- test ( 'canvas should partially change size if one of width or height', ( ) => {
179+ it ( ' should partially change size if one of width or height', ( ) => {
180180 wrapper . setProps ( { canvasProps : { width : size . width } } )
181181 window . resizeTo ( 500 , 500 )
182182
0 commit comments