Skip to content

Commit 4dea189

Browse files
committed
Upgrade grunt-contrib-qunit to version 10.1
Version 10.0 of this package changed how loading qunit with RequireJS is done. So the upgrade required changing the test suite to load qunit via a script tag and disable the autostart option. Relevant docs: * https://github.com/gruntjs/grunt-contrib-qunit * https://qunitjs.com/api/config/autostart/
1 parent b497859 commit 4dea189

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"grunt-contrib-copy": "~1.0",
4141
"grunt-contrib-csslint": "~2.0",
4242
"grunt-contrib-cssmin": "~5.0",
43-
"grunt-contrib-qunit": "~8.0",
43+
"grunt-contrib-qunit": "~10.1",
4444
"grunt-contrib-uglify": "~5.2",
4545
"grunt-eslint": "~24.3",
4646
"grunt-indent": "~1.0",

test/amd.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
<head>
44
<meta charset="utf-8" />
55
<title>PowerTip AMD Test Suite</title>
6+
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/qunit/qunit-2.24.1.css" />
7+
<script type="text/javascript" src="https://code.jquery.com/qunit/qunit-2.24.1.js"></script>
68
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.7/require.js"></script>
79
<script type="text/javascript" src="amd.js"></script>
8-
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/qunit/qunit-2.24.1.css" />
910
</head>
1011
<body>
1112
<div id="qunit"></div>

test/amd.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
'use strict';
22

3+
QUnit.config.autostart = false;
4+
35
require.config({
46
paths: {
57
jquery: 'https://code.jquery.com/jquery-3.7.1',
6-
qunit: 'https://code.jquery.com/qunit/qunit-2.24.1',
78
'jquery.powertip': '../dist/jquery.powertip'
89
}
910
});
1011

11-
require([ 'jquery', 'qunit', 'jquery.powertip' ], function($, QUnit, powerTip) {
12+
require([ 'jquery', 'jquery.powertip' ], function($, powerTip) {
1213
QUnit.start();
1314

1415
QUnit.module('AMD');

0 commit comments

Comments
 (0)