mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-17 19:21:23 +03:00
tests: revisit all tests using Promise.reject instead of throwing an error (#35765)
This commit is contained in:
@@ -102,7 +102,7 @@ describe('Alert', () => {
|
||||
})
|
||||
|
||||
it('should not remove alert if close event is prevented', () => {
|
||||
return new Promise(resolve => {
|
||||
return new Promise((resolve, reject) => {
|
||||
fixtureEl.innerHTML = '<div class="alert"></div>'
|
||||
|
||||
const getAlert = () => document.querySelector('.alert')
|
||||
@@ -118,7 +118,7 @@ describe('Alert', () => {
|
||||
})
|
||||
|
||||
alertEl.addEventListener('closed.bs.alert', () => {
|
||||
throw new Error('should not fire closed event')
|
||||
reject(new Error('should not fire closed event'))
|
||||
})
|
||||
|
||||
alert.close()
|
||||
|
||||
Reference in New Issue
Block a user