1
- import { describe , test , expect } from 'jest'
1
+ import { describe , it , test , expect } from 'jest'
2
2
import { mount } from 'enzyme'
3
3
import React from 'react'
4
4
@@ -136,20 +136,20 @@ describe('get methods return correct canvases', () => {
136
136
} )
137
137
138
138
// comes after props, wrappers, and gets as it uses them all
139
- describe ( 'resizing works correctly ' , ( ) => {
139
+ describe ( 'canvas resizing ' , ( ) => {
140
140
const wrapper = mount ( < SignatureCanvas /> )
141
141
const instance = wrapper . instance ( )
142
142
const canvas = instance . getCanvas ( )
143
143
144
- test ( 'canvas should clear on resize', ( ) => {
144
+ it ( ' should clear on resize', ( ) => {
145
145
instance . fromData ( dotF . data )
146
146
expect ( instance . isEmpty ( ) ) . toBe ( false )
147
147
148
148
window . resizeTo ( 500 , 500 )
149
149
expect ( instance . isEmpty ( ) ) . toBe ( true )
150
150
} )
151
151
152
- test ( 'canvas should not clear when clearOnResize is false', ( ) => {
152
+ it ( ' should not clear when clearOnResize is false', ( ) => {
153
153
wrapper . setProps ( { clearOnResize : false } )
154
154
155
155
instance . fromData ( dotF . data )
@@ -160,23 +160,23 @@ describe('resizing works correctly', () => {
160
160
} )
161
161
162
162
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', ( ) => {
164
164
wrapper . setProps ( { canvasProps : size } )
165
165
window . resizeTo ( 500 , 500 )
166
166
167
167
expect ( canvas . width ) . toBe ( size . width )
168
168
expect ( canvas . height ) . toBe ( size . height )
169
169
} )
170
170
171
- test ( 'canvas should change size if no width or height', ( ) => {
171
+ it ( ' should change size if no width or height', ( ) => {
172
172
wrapper . setProps ( { canvasProps : { } } )
173
173
window . resizeTo ( 500 , 500 )
174
174
175
175
expect ( canvas . width ) . not . toBe ( size . width )
176
176
expect ( canvas . height ) . not . toBe ( size . height )
177
177
} )
178
178
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', ( ) => {
180
180
wrapper . setProps ( { canvasProps : { width : size . width } } )
181
181
window . resizeTo ( 500 , 500 )
182
182
0 commit comments