2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-05 16:42:29 +03:00

Comply to the new rules

This commit is contained in:
XhmikosR
2020-06-12 21:50:30 +03:00
parent 1c37a2ba77
commit 3be585990c
35 changed files with 606 additions and 574 deletions
+2 -2
View File
@@ -13,8 +13,8 @@ const browsers = {
base: 'BrowserStack',
os: 'OS X',
os_version: 'High Sierra',
browser : 'Chrome',
browser_version : 'latest'
browser: 'Chrome',
browser_version: 'latest'
},
firefoxMac: {
base: 'BrowserStack',
+1 -1
View File
@@ -135,7 +135,7 @@ conf.plugins = plugins
conf.reporters = reporters
conf.files = files
module.exports = (karmaConfig) => {
module.exports = karmaConfig => {
// possible values: karmaConfig.LOG_DISABLE || karmaConfig.LOG_ERROR || karmaConfig.LOG_WARN || karmaConfig.LOG_INFO || karmaConfig.LOG_DEBUG
conf.logLevel = karmaConfig.LOG_ERROR || karmaConfig.LOG_WARN
karmaConfig.set(conf)
+7 -7
View File
@@ -65,8 +65,8 @@ $(function () {
$el.bootstrapCarousel()
try {
$el.bootstrapCarousel('noMethod')
} catch (err) {
assert.strictEqual(err.message, 'No method named "noMethod"')
} catch (error) {
assert.strictEqual(error.message, 'No method named "noMethod"')
}
})
@@ -89,8 +89,8 @@ $(function () {
try {
$('<div/>').bootstrapCarousel(config)
} catch (err) {
message = err.message
} catch (error) {
message = error.message
}
assert.ok(message === expectedMessage, 'correct error message')
@@ -102,8 +102,8 @@ $(function () {
try {
$('<div/>').bootstrapCarousel(config)
} catch (err) {
message = err.message
} catch (error) {
message = error.message
}
assert.ok(message === expectedMessage, 'correct error message')
@@ -652,7 +652,7 @@ $(function () {
var eventArrowDown = $.Event('keydown', {
which: 40
})
var eventArrowUp = $.Event('keydown', {
var eventArrowUp = $.Event('keydown', {
which: 38
})
+8 -8
View File
@@ -31,8 +31,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"')
}
})
@@ -457,7 +457,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))
@@ -468,7 +468,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.trigger('click')
@@ -604,8 +604,8 @@ $(function () {
var $collapseTwoOne = $('#collapseTwoOne')
var $collapseTwoTwo = $('#collapseTwoTwo')
var collapsedElements = {
one : false,
two : false
one: false,
two: false
}
function firstTest() {
@@ -830,7 +830,7 @@ $(function () {
parent: $('.my-collapse')
})
assert.ok(true, 'collapse correctly created')
} catch (err) {
} catch (_) {
assert.ok(false, 'collapse not created')
}
})
@@ -851,7 +851,7 @@ $(function () {
parent: $('.my-collapse')[0]
})
assert.ok(true, 'collapse correctly created')
} catch (err) {
} catch (_) {
assert.ok(false, 'collapse not created')
}
})
+2 -2
View File
@@ -31,8 +31,8 @@ $(function () {
$el.bootstrapDropdown()
try {
$el.bootstrapDropdown('noMethod')
} catch (err) {
assert.strictEqual(err.message, 'No method named "noMethod"')
} catch (error) {
assert.strictEqual(error.message, 'No method named "noMethod"')
}
})
+4 -4
View File
@@ -44,8 +44,8 @@ $(function () {
$el.bootstrapModal()
try {
$el.bootstrapModal('noMethod')
} catch (err) {
assert.strictEqual(err.message, 'No method named "noMethod"')
} catch (error) {
assert.strictEqual(error.message, 'No method named "noMethod"')
}
})
@@ -450,8 +450,8 @@ $(function () {
var originalPadding = $body.css('padding-right')
// Hide scrollbars to prevent the body overflowing
$body.css('overflow', 'hidden') // Real scrollbar (for in-browser testing)
$('html').css('padding-right', '0px') // Simulated scrollbar (for PhantomJS)
$body.css('overflow', 'hidden') // Real scrollbar (for in-browser testing)
$('html').css('padding-right', '0px') // Simulated scrollbar (for PhantomJS)
$('<div id="modal-test"/>')
.on('shown.bs.modal', function () {
+4 -4
View File
@@ -32,8 +32,8 @@ $(function () {
$el.bootstrapPopover()
try {
$el.bootstrapPopover('noMethod')
} catch (err) {
assert.strictEqual(err.message, 'No method named "noMethod"')
} catch (error) {
assert.strictEqual(error.message, 'No method named "noMethod"')
}
})
@@ -369,8 +369,8 @@ $(function () {
try {
$('<div data-toggle="popover" data-title="some title" data-content="@Johann-S" style="display: none"/>').bootstrapPopover('show')
} catch (err) {
assert.strictEqual(err.message, 'Please use show on visible elements')
} catch (error) {
assert.strictEqual(error.message, 'Please use show on visible elements')
done()
}
})
+2 -2
View File
@@ -31,8 +31,8 @@ $(function () {
$el.bootstrapScrollspy()
try {
$el.bootstrapScrollspy('noMethod')
} catch (err) {
assert.strictEqual(err.message, 'No method named "noMethod"')
} catch (error) {
assert.strictEqual(error.message, 'No method named "noMethod"')
}
})
+4 -4
View File
@@ -31,8 +31,8 @@ $(function () {
$el.bootstrapTab()
try {
$el.bootstrapTab('noMethod')
} catch (err) {
assert.strictEqual(err.message, 'No method named "noMethod"')
} catch (error) {
assert.strictEqual(error.message, 'No method named "noMethod"')
}
})
@@ -94,7 +94,7 @@ $(function () {
QUnit.test('should activate element by tab id in nav list', function (assert) {
assert.expect(2)
var tabsHTML = '<nav class="nav">' +
var tabsHTML = '<nav class="nav">' +
'<a href="#home">Home</a>' +
'<a href="#profile">Profile</a>' +
'</nav>'
@@ -110,7 +110,7 @@ $(function () {
QUnit.test('should activate element by tab id in list group', function (assert) {
assert.expect(2)
var tabsHTML = '<div class="list-group">' +
var tabsHTML = '<div class="list-group">' +
'<a href="#home">Home</a>' +
'<a href="#profile">Profile</a>' +
'</div>'
+2 -2
View File
@@ -41,8 +41,8 @@ $(function () {
try {
$el.bootstrapToast('noMethod')
} catch (err) {
assert.strictEqual(err.message, 'No method named "noMethod"')
} catch (error) {
assert.strictEqual(error.message, 'No method named "noMethod"')
}
})
+6 -6
View File
@@ -32,8 +32,8 @@ $(function () {
$el.bootstrapTooltip()
try {
$el.bootstrapTooltip('noMethod')
} catch (err) {
assert.strictEqual(err.message, 'No method named "noMethod"')
} catch (error) {
assert.strictEqual(error.message, 'No method named "noMethod"')
}
})
@@ -231,8 +231,8 @@ $(function () {
try {
$('<div title="tooltip title" style="display: none"/>').bootstrapTooltip('show')
} catch (err) {
assert.strictEqual(err.message, 'Please use show on visible elements')
} catch (error) {
assert.strictEqual(error.message, 'Please use show on visible elements')
done()
}
})
@@ -336,7 +336,7 @@ $(function () {
assert.expect(7)
var $tooltip = $('<div/>')
.bootstrapTooltip()
.on('click.foo', function () {}) // eslint-disable-line no-empty-function
.on('click.foo', function () {})
assert.ok($tooltip.data('bs.tooltip'), 'tooltip has data')
assert.ok($._data($tooltip[0], 'events').mouseover && $._data($tooltip[0], 'events').mouseout, 'tooltip has hover events')
@@ -561,7 +561,7 @@ $(function () {
try {
$tooltip.bootstrapTooltip('show')
} catch (err) {
} catch (_) {
passed = false
}
+2 -2
View File
@@ -46,8 +46,8 @@ $(function () {
try {
Util.typeCheckConfig(namePlugin, config, defaultType)
} catch (err) {
assert.strictEqual(err.message, 'COLLAPSE: Option "parent" provided type "number" but expected type "(string|element)".')
} catch (error) {
assert.strictEqual(error.message, 'COLLAPSE: Option "parent" provided type "number" but expected type "(string|element)".')
}
})