1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

Standardization of spyOn usage (#36742)

This commit is contained in:
Julien Déramond 2022-07-15 15:52:03 +02:00 committed by GitHub
parent 713d7140f1
commit aa8d0b3439
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()
})