diff options
Diffstat (limited to 'js/tests/unit/alert.spec.js')
-rw-r--r-- | js/tests/unit/alert.spec.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/tests/unit/alert.spec.js b/js/tests/unit/alert.spec.js index e2fe49246a..bfe6f9a292 100644 --- a/js/tests/unit/alert.spec.js +++ b/js/tests/unit/alert.spec.js @@ -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() |