mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-17 02:54:01 +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:
committed by
GitHub
parent
78c0ad8044
commit
d388bd6e1b
@@ -576,7 +576,7 @@ describe('Util', () => {
|
||||
const spy = jasmine.createSpy()
|
||||
const spy2 = jasmine.createSpy()
|
||||
|
||||
spyOn(document, 'addEventListener').and.callThrough()
|
||||
const spyAdd = spyOn(document, 'addEventListener').and.callThrough()
|
||||
spyOnProperty(document, 'readyState').and.returnValue('loading')
|
||||
|
||||
Util.onDOMContentLoaded(spy)
|
||||
@@ -589,7 +589,7 @@ describe('Util', () => {
|
||||
|
||||
expect(spy).toHaveBeenCalled()
|
||||
expect(spy2).toHaveBeenCalled()
|
||||
expect(document.addEventListener).toHaveBeenCalledTimes(1)
|
||||
expect(spyAdd).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
|
||||
it('should execute callback if readyState is not "loading"', () => {
|
||||
|
Reference in New Issue
Block a user