aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJulien Déramond <[email protected]>2022-07-15 15:52:03 +0200
committerGitHub <[email protected]>2022-07-15 16:52:03 +0300
commitaa8d0b34399b647c1e89f58a9d244a396846cd64 (patch)
tree00a57edea59bfeab5589105c3e166ee9f9e9c793 /js
parent713d7140f18514c916f75be34e809ebe00c1691c (diff)
downloadbootstrap-aa8d0b34399b647c1e89f58a9d244a396846cd64.tar.xz
bootstrap-aa8d0b34399b647c1e89f58a9d244a396846cd64.zip
Standardization of `spyOn` usage (#36742)
Diffstat (limited to 'js')
-rw-r--r--js/tests/unit/modal.spec.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/tests/unit/modal.spec.js b/js/tests/unit/modal.spec.js
index 9e463d2be..1bdf4e66a 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()
})