Skip to content

Commit aa8d0b3

Browse files
authoredJul 15, 2022
Standardization of spyOn usage (#36742)
1 parent 713d714 commit aa8d0b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎js/tests/unit/modal.spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -713,16 +713,16 @@ describe('Modal', () => {
713713
const dialogEl = modalEl.querySelector('.modal-dialog')
714714
const modal = new Modal(modalEl)
715715

716-
spyOn(modal, 'hide')
716+
const spy = spyOn(modal, 'hide')
717717

718718
modalEl.addEventListener('shown.bs.modal', () => {
719719
const mouseDown = createEvent('mousedown')
720720

721721
dialogEl.dispatchEvent(mouseDown)
722-
expect(modal.hide).not.toHaveBeenCalled()
722+
expect(spy).not.toHaveBeenCalled()
723723

724724
modalEl.dispatchEvent(mouseDown)
725-
expect(modal.hide).toHaveBeenCalled()
725+
expect(spy).toHaveBeenCalled()
726726
resolve()
727727
})
728728

0 commit comments

Comments
 (0)
Please sign in to comment.