@@ -169,30 +169,30 @@ describe("Vue Integration", () => {
169169 expect ( offsetButton ) . toHaveTextContent ( "10" ) ;
170170 } ) ;
171171
172- it ( "calls updateOptions when options change" , async ( ) => {
172+ it ( "calls replaceOptions when options change" , async ( ) => {
173173 const { getByTestId } = renderTestComponent ( ) ;
174174 const toggleEnabledButton = getByTestId ( "toggle-enabled" ) ;
175175 const togglePositionButton = getByTestId ( "toggle-position" ) ;
176176 const toggleOffsetButton = getByTestId ( "toggle-offset" ) ;
177177
178- mockAdhesiveInstance . updateOptions . mockClear ( ) ;
178+ mockAdhesiveInstance . replaceOptions . mockClear ( ) ;
179179
180180 await fireEvent . click ( toggleEnabledButton ) ;
181- expect ( mockAdhesiveInstance . updateOptions ) . toHaveBeenCalledWith (
181+ expect ( mockAdhesiveInstance . replaceOptions ) . toHaveBeenCalledWith (
182182 expect . objectContaining ( {
183183 enabled : false ,
184184 } ) ,
185185 ) ;
186186
187187 await fireEvent . click ( togglePositionButton ) ;
188- expect ( mockAdhesiveInstance . updateOptions ) . toHaveBeenCalledWith (
188+ expect ( mockAdhesiveInstance . replaceOptions ) . toHaveBeenCalledWith (
189189 expect . objectContaining ( {
190190 position : "bottom" ,
191191 } ) ,
192192 ) ;
193193
194194 await fireEvent . click ( toggleOffsetButton ) ;
195- expect ( mockAdhesiveInstance . updateOptions ) . toHaveBeenCalledWith (
195+ expect ( mockAdhesiveInstance . replaceOptions ) . toHaveBeenCalledWith (
196196 expect . objectContaining ( {
197197 offset : TEST_OFFSETS [ 2 ] ,
198198 } ) ,
@@ -496,26 +496,26 @@ describe("Vue Integration", () => {
496496 expect ( getByTestId ( "toggle-enabled" ) ) . toHaveTextContent ( "Disable" ) ;
497497 expect ( getByTestId ( "change-offset" ) ) . toHaveTextContent ( "Offset: 10" ) ;
498498
499- mockAdhesiveInstance . updateOptions . mockClear ( ) ;
499+ mockAdhesiveInstance . replaceOptions . mockClear ( ) ;
500500
501501 await fireEvent . click ( getByTestId ( "toggle-enabled" ) ) ;
502502 expect ( getByTestId ( "toggle-enabled" ) ) . toHaveTextContent ( "Enable" ) ;
503- expect ( mockAdhesiveInstance . updateOptions ) . toHaveBeenCalledWith (
503+ expect ( mockAdhesiveInstance . replaceOptions ) . toHaveBeenCalledWith (
504504 expect . objectContaining ( {
505505 enabled : false ,
506506 } ) ,
507507 ) ;
508508
509509 await fireEvent . click ( getByTestId ( "change-offset" ) ) ;
510510 expect ( getByTestId ( "change-offset" ) ) . toHaveTextContent ( "Offset: 30" ) ;
511- expect ( mockAdhesiveInstance . updateOptions ) . toHaveBeenCalledWith (
511+ expect ( mockAdhesiveInstance . replaceOptions ) . toHaveBeenCalledWith (
512512 expect . objectContaining ( {
513513 offset : 30 ,
514514 } ) ,
515515 ) ;
516516 } ) ;
517517
518- it ( "calls updateOptions when directive value changes" , async ( ) => {
518+ it ( "calls replaceOptions when directive value changes" , async ( ) => {
519519 const TestComponent = createTestApp (
520520 `
521521 <div>
@@ -547,11 +547,11 @@ describe("Vue Integration", () => {
547547 } ,
548548 } ) ;
549549
550- mockAdhesiveInstance . updateOptions . mockClear ( ) ;
550+ mockAdhesiveInstance . replaceOptions . mockClear ( ) ;
551551
552552 await fireEvent . click ( getByTestId ( "increment-offset" ) ) ;
553553
554- expect ( mockAdhesiveInstance . updateOptions ) . toHaveBeenCalledWith (
554+ expect ( mockAdhesiveInstance . replaceOptions ) . toHaveBeenCalledWith (
555555 expect . objectContaining ( {
556556 offset : 20 ,
557557 } ) ,
0 commit comments