Skip to content

Commit fb95089

Browse files
committed
[fixup]: Upgrade grunt-contrib-qunit
1 parent e79f763 commit fb95089

File tree

4 files changed

+10
-79
lines changed

4 files changed

+10
-79
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"grunt-contrib-concat": "0.1.3",
6464
"grunt-contrib-csslint": "0.2.0",
6565
"grunt-contrib-jshint": "0.7.1",
66-
"grunt-contrib-qunit": "0.4.0",
66+
"grunt-contrib-qunit": "0.6.0",
6767
"grunt-contrib-uglify": "0.1.1",
6868
"grunt-esformatter": "0.2.0",
6969
"grunt-git-authors": "2.0.0",

tests/lib/bootstrap.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ window.requirejs = {
66
"jquery.simulate": "../../../external/jquery-simulate/jquery.simulate",
77
"jshint": "../../../external/jshint/jshint",
88
"lib": "../../lib",
9+
"phantom-bridge": "../../../node_modules/grunt-contrib-qunit/phantomjs/bridge",
910
"qunit-assert-classes": "../../../external/qunit-assert-classes/qunit-assert-classes",
1011
"qunit": "../../../external/qunit/qunit",
1112
"ui": "../../../ui"
@@ -125,6 +126,12 @@ function swarmInject() {
125126
script = document.createElement( "script" );
126127
script.src = "../../../external/requirejs/require.js";
127128
script.onload = function() {
129+
130+
// Create a dummy bridge if we're not actually testing in PhantomJS
131+
if ( !/PhantomJS/.test( navigator.userAgent ) ) {
132+
define( "phantom-bridge", function() {} );
133+
}
134+
128135
requireTests( modules );
129136
};
130137
document.documentElement.appendChild( script );

tests/lib/qunit-bridge.js

Lines changed: 0 additions & 72 deletions
This file was deleted.

tests/lib/qunit.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
define( [
22
"qunit",
33
"jquery",
4-
"./qunit-bridge",
5-
], function( QUnit, $, bridge ) {
4+
"phantom-bridge"
5+
], function( QUnit, $ ) {
66

77
QUnit.config.autostart = false;
88
QUnit.config.requireExpects = true;
@@ -40,10 +40,6 @@ QUnit.reset = ( function( reset ) {
4040
};
4141
} )( QUnit.reset );
4242

43-
if ( /PhantomJS/.test( navigator.userAgent ) ) {
44-
bridge();
45-
}
46-
4743
return QUnit;
4844

4945
} );

0 commit comments

Comments
 (0)