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:
@@ -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()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user