Skip to content

Commit

Permalink
Remove unneeded conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Sep 15, 2021
1 parent af52795 commit bdab948
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
8 changes: 3 additions & 5 deletions js/tests/unit/alert.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
$(function () {
'use strict'

window.Alert = typeof bootstrap !== 'undefined' ? bootstrap.Alert : Alert

QUnit.module('alert plugin')

QUnit.test('should be defined on jquery object', function (assert) {
Expand Down Expand Up @@ -114,10 +116,6 @@ $(function () {
QUnit.test('should return alert version', function (assert) {
assert.expect(1)

if (typeof Alert !== 'undefined') {
assert.strictEqual(typeof Alert.VERSION, 'string')
} else {
assert.notOk()
}
assert.strictEqual(typeof Alert.VERSION, 'string')
})
})
8 changes: 3 additions & 5 deletions js/tests/unit/button.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
$(function () {
'use strict'

window.Button = typeof bootstrap !== 'undefined' ? bootstrap.Button : Button

QUnit.module('button plugin')

QUnit.test('should be defined on jquery object', function (assert) {
Expand Down Expand Up @@ -472,10 +474,6 @@ $(function () {
QUnit.test('should return button version', function (assert) {
assert.expect(1)

if (typeof Button !== 'undefined') {
assert.strictEqual(typeof Button.VERSION, 'string')
} else {
assert.notOk()
}
assert.strictEqual(typeof Button.VERSION, 'string')
})
})
4 changes: 1 addition & 3 deletions js/tests/unit/toast.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
$(function () {
'use strict'

if (typeof bootstrap !== 'undefined') {
window.Toast = bootstrap.Toast
}
window.Toast = typeof bootstrap !== 'undefined' ? bootstrap.Toast : Toast

QUnit.module('toast plugin')

Expand Down

0 comments on commit bdab948

Please sign in to comment.