1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-13 00:54:04 +02:00

JS: tests fixes & standardization of spies usage (#36398)

* Fix carousel spec typo
* Change carousel test name in align with testing method
* Make the spies declarations the same everywhere
This commit is contained in:
Louis-Maxime Piton
2022-05-31 10:18:32 +02:00
committed by GitHub
parent 78c0ad8044
commit d388bd6e1b
18 changed files with 338 additions and 342 deletions

View File

@@ -148,14 +148,14 @@ describe('Alert', () => {
const alertEl = fixtureEl.querySelector('.alert')
const alert = new Alert(alertEl)
spyOn(alert, 'close')
const spy = spyOn(alert, 'close')
jQueryMock.fn.alert = Alert.jQueryInterface
jQueryMock.elements = [alertEl]
jQueryMock.fn.alert.call(jQueryMock, 'close')
expect(alert.close).toHaveBeenCalled()
expect(spy).toHaveBeenCalled()
})
it('should create new alert instance and call close', () => {