1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-15 10:05:40 +02:00

tests: revisit all tests using Promise.reject instead of throwing an error (#35765)

This commit is contained in:
GeoSot
2022-02-19 16:08:16 +02:00
committed by GitHub
parent ae12d645ef
commit 4b17868fb4
10 changed files with 72 additions and 72 deletions

View File

@@ -373,12 +373,12 @@ describe('EventHandler', () => {
})
it('should remove a listener registered by .one', () => {
return new Promise(resolve => {
return new Promise((resolve, reject) => {
fixtureEl.innerHTML = '<div></div>'
const div = fixtureEl.querySelector('div')
const handler = () => {
throw new Error('called')
reject(new Error('called'))
}
EventHandler.one(div, 'foobar', handler)