2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

fix: remove make array util function (#30430)

This commit is contained in:
Johann-S
2020-03-25 15:35:02 +01:00
committed by GitHub
parent 98c4598696
commit 26d86fce2a
17 changed files with 53 additions and 89 deletions
+5 -5
View File
@@ -1,5 +1,5 @@
import Alert from '../../src/alert'
import { makeArray, getTransitionDurationFromElement } from '../../src/util/index'
import { getTransitionDurationFromElement } from '../../src/util/index'
/** Test helpers */
import { getFixture, clearFixture, jQueryMock } from '../helpers/fixture'
@@ -30,7 +30,7 @@ describe('Alert', () => {
const button = document.querySelector('button')
button.click()
expect(makeArray(document.querySelectorAll('.alert')).length).toEqual(0)
expect(document.querySelectorAll('.alert').length).toEqual(0)
})
it('should close an alert without instantiating it manually with the parent selector', () => {
@@ -43,7 +43,7 @@ describe('Alert', () => {
const button = document.querySelector('button')
button.click()
expect(makeArray(document.querySelectorAll('.alert')).length).toEqual(0)
expect(document.querySelectorAll('.alert').length).toEqual(0)
})
})
@@ -56,7 +56,7 @@ describe('Alert', () => {
const alert = new Alert(alertEl)
alertEl.addEventListener('closed.bs.alert', () => {
expect(makeArray(document.querySelectorAll('.alert')).length).toEqual(0)
expect(document.querySelectorAll('.alert').length).toEqual(0)
expect(spy).not.toHaveBeenCalled()
done()
})
@@ -75,7 +75,7 @@ describe('Alert', () => {
})
alertEl.addEventListener('closed.bs.alert', () => {
expect(makeArray(document.querySelectorAll('.alert')).length).toEqual(0)
expect(document.querySelectorAll('.alert').length).toEqual(0)
done()
})