From aa8d0b34399b647c1e89f58a9d244a396846cd64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Fri, 15 Jul 2022 15:52:03 +0200 Subject: [PATCH] Standardization of `spyOn` usage (#36742) --- js/tests/unit/modal.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/tests/unit/modal.spec.js b/js/tests/unit/modal.spec.js index 9e463d2be3..1bdf4e66ad 100644 --- a/js/tests/unit/modal.spec.js +++ b/js/tests/unit/modal.spec.js @@ -713,16 +713,16 @@ describe('Modal', () => { const dialogEl = modalEl.querySelector('.modal-dialog') const modal = new Modal(modalEl) - spyOn(modal, 'hide') + const spy = spyOn(modal, 'hide') modalEl.addEventListener('shown.bs.modal', () => { const mouseDown = createEvent('mousedown') dialogEl.dispatchEvent(mouseDown) - expect(modal.hide).not.toHaveBeenCalled() + expect(spy).not.toHaveBeenCalled() modalEl.dispatchEvent(mouseDown) - expect(modal.hide).toHaveBeenCalled() + expect(spy).toHaveBeenCalled() resolve() })