File tree Expand file tree Collapse file tree 3 files changed +7
-13
lines changed Expand file tree Collapse file tree 3 files changed +7
-13
lines changed Original file line number Diff line number Diff line change 1
1
$ ( function ( ) {
2
2
'use strict'
3
3
4
+ window . Alert = typeof bootstrap !== 'undefined' ? bootstrap . Alert : Alert
5
+
4
6
QUnit . module ( 'alert plugin' )
5
7
6
8
QUnit . test ( 'should be defined on jquery object' , function ( assert ) {
@@ -114,10 +116,6 @@ $(function () {
114
116
QUnit . test ( 'should return alert version' , function ( assert ) {
115
117
assert . expect ( 1 )
116
118
117
- if ( typeof Alert !== 'undefined' ) {
118
- assert . strictEqual ( typeof Alert . VERSION , 'string' )
119
- } else {
120
- assert . notOk ( )
121
- }
119
+ assert . strictEqual ( typeof Alert . VERSION , 'string' )
122
120
} )
123
121
} )
Original file line number Diff line number Diff line change 1
1
$ ( function ( ) {
2
2
'use strict'
3
3
4
+ window . Button = typeof bootstrap !== 'undefined' ? bootstrap . Button : Button
5
+
4
6
QUnit . module ( 'button plugin' )
5
7
6
8
QUnit . test ( 'should be defined on jquery object' , function ( assert ) {
@@ -472,10 +474,6 @@ $(function () {
472
474
QUnit . test ( 'should return button version' , function ( assert ) {
473
475
assert . expect ( 1 )
474
476
475
- if ( typeof Button !== 'undefined' ) {
476
- assert . strictEqual ( typeof Button . VERSION , 'string' )
477
- } else {
478
- assert . notOk ( )
479
- }
477
+ assert . strictEqual ( typeof Button . VERSION , 'string' )
480
478
} )
481
479
} )
Original file line number Diff line number Diff line change 1
1
$ ( function ( ) {
2
2
'use strict'
3
3
4
- if ( typeof bootstrap !== 'undefined' ) {
5
- window . Toast = bootstrap . Toast
6
- }
4
+ window . Toast = typeof bootstrap !== 'undefined' ? bootstrap . Toast : Toast
7
5
8
6
QUnit . module ( 'toast plugin' )
9
7
You can’t perform that action at this time.
0 commit comments