mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-12 00:24:03 +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
@@ -84,12 +84,12 @@ describe('Sanitizer', () => {
|
||||
return htmlUnsafe
|
||||
}
|
||||
|
||||
spyOn(DOMParser.prototype, 'parseFromString')
|
||||
const spy = spyOn(DOMParser.prototype, 'parseFromString')
|
||||
|
||||
const result = sanitizeHtml(template, DefaultAllowlist, mySanitize)
|
||||
|
||||
expect(result).toEqual(template)
|
||||
expect(DOMParser.prototype.parseFromString).not.toHaveBeenCalled()
|
||||
expect(spy).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('should allow multiple sanitation passes of the same template', () => {
|
||||
|
Reference in New Issue
Block a user