$(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) {
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')
})
})
$(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) {
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')
})
})
$(function () {
'use strict'
- if (typeof bootstrap !== 'undefined') {
- window.Toast = bootstrap.Toast
- }
+ window.Toast = typeof bootstrap !== 'undefined' ? bootstrap.Toast : Toast
QUnit.module('toast plugin')