test(carousel): flatten promise code

This commit is contained in:
07akioni 2021-10-19 00:16:00 +08:00
parent 68a804b426
commit 1db7127f70

View File

@ -148,13 +148,13 @@ describe('n-carousel', () => {
expect(slidesDOMArray[2].attributes('aria-hidden')).toBe('false')
await sleep(1000)
await nextTick(() => {
void wrapper
.find('.n-carousel__arrow--left')
.trigger('click')
.then(() => {
expect(slidesDOMArray[1].attributes('aria-hidden')).toBe('false')
})
})
await nextTick()
void wrapper
.find('.n-carousel__arrow--left')
.trigger('click')
.then(() => {
expect(slidesDOMArray[1].attributes('aria-hidden')).toBe('false')
})
})
})