1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-11 08:04:59 +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

@@ -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()