2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Comply to the new rules.

This commit is contained in:
XhmikosR
2019-02-26 13:20:34 +02:00
parent 44e6abcba5
commit 46c037410b
44 changed files with 854 additions and 771 deletions
+9 -9
View File
@@ -1,7 +1,7 @@
$(function () {
'use strict'
var Collapse = typeof window.bootstrap !== 'undefined' ? window.bootstrap.Collapse : window.Collapse
var Collapse = typeof window.bootstrap === 'undefined' ? window.Collapse : window.bootstrap.Collapse
QUnit.module('collapse plugin')
@@ -33,8 +33,8 @@ $(function () {
$el.bootstrapCollapse()
try {
$el.bootstrapCollapse('noMethod')
} catch (err) {
assert.strictEqual(err.message, 'No method named "noMethod"')
} catch (error) {
assert.strictEqual(error.message, 'No method named "noMethod"')
}
})
@@ -459,7 +459,7 @@ $(function () {
'<div class="card"/>' +
'</div>'
var showFired = false
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.card')
var $groups = $(accordionHTML).appendTo('#qunit-fixture').find('.card')
var $target1 = $('<a role="button" data-toggle="collapse" href="#body1"/>').appendTo($groups.eq(0))
@@ -470,7 +470,7 @@ $(function () {
})
var $target2 = $('<a role="button" data-toggle="collapse" href="#body2"/>').appendTo($groups.eq(1))
var $body2 = $('<div id="body2" class="collapse" data-parent="#accordion"/>').appendTo($groups.eq(1))
var $body2 = $('<div id="body2" class="collapse" data-parent="#accordion"/>').appendTo($groups.eq(1))
$target2[0].dispatchEvent(new Event('click'))
@@ -607,8 +607,8 @@ $(function () {
var $collapseTwoOne = $('#collapseTwoOne')
var $collapseTwoTwo = $('#collapseTwoTwo')
var collapsedElements = {
one : false,
two : false
one: false,
two: false
}
function firstTest() {
@@ -838,7 +838,7 @@ $(function () {
parent: $('.my-collapse')
})
assert.ok(true, 'collapse correctly created')
} catch (err) {
} catch (error) {
assert.ok(false, 'collapse not created')
}
})
@@ -859,7 +859,7 @@ $(function () {
parent: $('.my-collapse')[0]
})
assert.ok(true, 'collapse correctly created')
} catch (err) {
} catch (error) {
assert.ok(false, 'collapse not created')
}
})