@@ -35,7 +35,7 @@ describe('Component', () => {
3535 it ( 'renders the component' , ( ) => {
3636 const { queryByTestId } = render ( < SignaturePad redrawOnResize /> ) ;
3737
38- expect ( queryByTestId ( 'canvas-element' ) ) . toBeTruthy ( ) ;
38+ expect ( queryByTestId ( 'canvas-element' ) ) . toBeInTheDocument ( ) ;
3939 } ) ;
4040
4141 it ( 'loads a signature' , ( ) => {
@@ -142,7 +142,7 @@ describe('Component', () => {
142142 const instance = React . createRef < SignaturePad > ( ) ;
143143
144144 render ( < SignaturePad ref = { instance } redrawOnResize /> ) ;
145-
145+
146146 const spy = jest . spyOn ( instance . current ! . instance , 'off' ) ;
147147
148148 instance . current ! . off ( ) ;
@@ -214,17 +214,22 @@ describe('Component', () => {
214214
215215 render ( < SignaturePad ref = { instance } redrawOnResize width = { 512 } height = { 512 } /> ) ;
216216
217- expect ( spy ) . not . toHaveBeenCalledWith ( 'resize' , Reflect . get ( instance . current as SignaturePad , 'callResizeHandler' ) ) ;
217+ expect ( spy ) . not . toHaveBeenCalledWith (
218+ 'resize' ,
219+ Reflect . get ( instance . current as SignaturePad , 'callResizeHandler' ) ,
220+ ) ;
218221 } ) ;
219222
220223 it ( 'adds the resize event listener on mount' , ( ) => {
221224 const spy = jest . spyOn ( window , 'addEventListener' ) ;
222225 const instance = React . createRef < SignaturePad > ( ) ;
223226
224227 render ( < SignaturePad ref = { instance } /> ) ;
225-
226228
227- expect ( spy ) . toHaveBeenCalledWith ( 'resize' , Reflect . get ( instance . current as SignaturePad , 'callResizeHandler' ) ) ;
229+ expect ( spy ) . toHaveBeenCalledWith (
230+ 'resize' ,
231+ Reflect . get ( instance . current as SignaturePad , 'callResizeHandler' ) ,
232+ ) ;
228233 } ) ;
229234
230235 it ( 'removes the resize event listener on unmount' , ( ) => {
0 commit comments