2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-14 18:42:30 +03: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
+2 -2
View File
@@ -270,7 +270,7 @@ describe('Carousel', () => {
})
it('should stay at the start when the prev method is called and wrap is false', () => {
return new Promise(resolve => {
return new Promise((resolve, reject) => {
fixtureEl.innerHTML = [
'<div id="myCarousel" class="carousel slide">',
' <div class="carousel-inner">',
@@ -286,7 +286,7 @@ describe('Carousel', () => {
const carousel = new Carousel(carouselEl, { wrap: false })
carouselEl.addEventListener('slid.bs.carousel', () => {
throw new Error('carousel slid when it should not have slid')
reject(new Error('carousel slid when it should not have slid'))
})
carousel.prev()