Skip to content

Commit

Permalink
done callback
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Sep 8, 2021
1 parent 33f2b4c commit e4b56d6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
16 changes: 12 additions & 4 deletions js/tests/unit/collapse.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ $(function () {

$test.bootstrapCollapse('show')

setTimeout(done, 0)
setTimeout(function () {
done()
}, 0)
})

QUnit.test('should open a collapse when initialized with "show" option if not already shown', function (assert) {
Expand All @@ -247,7 +249,9 @@ $(function () {

$test.bootstrapCollapse('show')

setTimeout(done, 0)
setTimeout(function () {
done()
}, 0)
})

QUnit.test('should not show a collapse when initialized with "hide" option if already hidden', function (assert) {
Expand All @@ -261,7 +265,9 @@ $(function () {
})
.bootstrapCollapse('hide')

setTimeout(done, 0)
setTimeout(function () {
done()
}, 0)
})

QUnit.test('should hide a collapse when initialized with "hide" option if not already hidden', function (assert) {
Expand All @@ -275,7 +281,9 @@ $(function () {
})
.bootstrapCollapse('hide')

setTimeout(done, 0)
setTimeout(function () {
done()
}, 0)
})

QUnit.test('should remove "collapsed" class from active accordion target', function (assert) {
Expand Down
4 changes: 3 additions & 1 deletion js/tests/unit/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,9 @@ $(function () {

$toggleBtn.trigger('click')

setTimeout(done, 500)
setTimeout(function () {
done()
}, 500)
})

QUnit.test('should not try to open a modal which is already visible', function (assert) {
Expand Down

0 comments on commit e4b56d6

Please sign in to comment.