@@ -108,7 +108,7 @@ describe('given the <Parallax> component', () => {
108108 wrapper : Wrapper ,
109109 } ) ;
110110 expect ( asFragment ( ) ) . toMatchSnapshot ( ) ;
111- expect ( controller . createElement ) . toBeCalledWith ( {
111+ expect ( controller . createElement ) . toHaveBeenCalledWith ( {
112112 el : expect . any ( HTMLElement ) ,
113113 props,
114114 } ) ;
@@ -126,7 +126,7 @@ describe('given the <Parallax> component', () => {
126126 < Parallax translateY = { [ - 100 , 100 ] } />
127127 </ MockProvider >
128128 ) ;
129- expect ( controller . createElement ) . toBeCalledWith ( {
129+ expect ( controller . createElement ) . toHaveBeenCalledWith ( {
130130 el : expect . any ( HTMLElement ) ,
131131 props : { translateY : [ - 100 , 100 ] } ,
132132 } ) ;
@@ -147,7 +147,7 @@ describe('given the <Parallax> component', () => {
147147 ) ;
148148 const element = controller . getElements ( ) [ 0 ] ;
149149 unmount ( ) ;
150- expect ( controller . removeElementById ) . toBeCalledWith ( element . id ) ;
150+ expect ( controller . removeElementById ) . toHaveBeenCalledWith ( element . id ) ;
151151 } ) ;
152152
153153 it ( 'then it updates an element in the controller when receiving relevant new props' , ( ) => {
@@ -178,11 +178,14 @@ describe('given the <Parallax> component', () => {
178178
179179 const element = controller . getElements ( ) [ 0 ] ;
180180
181- expect ( controller . updateElementPropsById ) . toBeCalledWith ( element . id , {
182- disabled : false ,
183- translateX : [ 100 , - 100 ] ,
184- translateY : [ - 100 , 100 ] ,
185- } ) ;
181+ expect ( controller . updateElementPropsById ) . toHaveBeenCalledWith (
182+ element . id ,
183+ {
184+ disabled : false ,
185+ translateX : [ 100 , - 100 ] ,
186+ translateY : [ - 100 , 100 ] ,
187+ }
188+ ) ;
186189
187190 const newProps = {
188191 disabled : false ,
@@ -198,11 +201,14 @@ describe('given the <Parallax> component', () => {
198201 />
199202 ) ;
200203
201- expect ( controller . updateElementPropsById ) . toBeCalledWith ( element . id , {
202- disabled : false ,
203- translateX : [ - 40 , - 60 ] ,
204- translateY : [ 10 , 80 ] ,
205- } ) ;
204+ expect ( controller . updateElementPropsById ) . toHaveBeenCalledWith (
205+ element . id ,
206+ {
207+ disabled : false ,
208+ translateX : [ - 40 , - 60 ] ,
209+ translateY : [ 10 , 80 ] ,
210+ }
211+ ) ;
206212
207213 // only update with valid props
208214 rerender (
@@ -254,12 +260,15 @@ describe('given the <Parallax> component', () => {
254260
255261 const element = controller . getElements ( ) [ 0 ] ;
256262
257- expect ( controller . resetElementStyles ) . toBeCalledWith ( element ) ;
258- expect ( controller . updateElementPropsById ) . toBeCalledWith ( element . id , {
259- disabled : true ,
260- translateX : [ 100 , - 100 ] ,
261- translateY : [ - 100 , 100 ] ,
262- } ) ;
263+ expect ( controller . resetElementStyles ) . toHaveBeenCalledWith ( element ) ;
264+ expect ( controller . updateElementPropsById ) . toHaveBeenCalledWith (
265+ element . id ,
266+ {
267+ disabled : true ,
268+ translateX : [ 100 , - 100 ] ,
269+ translateY : [ - 100 , 100 ] ,
270+ }
271+ ) ;
263272 } ) ;
264273
265274 it ( 'then it resets styles on an element if the disabled prop is true' , ( ) => {
@@ -290,7 +299,7 @@ describe('given the <Parallax> component', () => {
290299 < Parallax disabled = { true } translateX = { offX } translateY = { offY } />
291300 ) ;
292301
293- expect ( controller . resetElementStyles ) . toBeCalled ( ) ;
302+ expect ( controller . resetElementStyles ) . toHaveBeenCalled ( ) ;
294303 } ) ;
295304 } ) ;
296305} ) ;
0 commit comments