Skip to content

Commit a2af61e

Browse files
committed
Build: Use npm for QUnit (via grunt npmcopy); update to 1.17.1
Hacky HTML injection is no longer required since QUnit now supports urlConfig values that can be an array of options, which corrrespond to a select of values.
1 parent d0baca4 commit a2af61e

File tree

6 files changed

+2409
-1462
lines changed

6 files changed

+2409
-1462
lines changed

Gruntfile.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,17 @@ module.exports = function(grunt) {
6464
qunit: {
6565
files: [ "test/**/*.html" ]
6666
},
67+
npmcopy: {
68+
all: {
69+
options: {
70+
destPrefix: "external"
71+
},
72+
files: {
73+
"qunit/qunit.js": "qunitjs/qunit/qunit.js",
74+
"qunit/qunit.css": "qunitjs/qunit/qunit.css",
75+
"qunit/LICENSE.txt": "qunitjs/LICENSE.txt" }
76+
}
77+
},
6778
jshint: {
6879
dist: {
6980
src: [ "dist/jquery-migrate.js" ],
@@ -105,6 +116,7 @@ module.exports = function(grunt) {
105116
grunt.loadNpmTasks("grunt-contrib-jshint");
106117
grunt.loadNpmTasks("grunt-contrib-uglify");
107118
grunt.loadNpmTasks("grunt-contrib-qunit");
119+
grunt.loadNpmTasks("grunt-npmcopy");
108120

109121
// Default task.
110122
grunt.registerTask( "default", [ "concat", "uglify", "jshint", "qunit" ] );

external/qunit/LICENSE.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Copyright jQuery Foundation and other contributors, https://jquery.org/
2+
3+
This software consists of voluntary contributions made by many
4+
individuals. For exact contribution history, see the revision history
5+
available at https://github.com/jquery/qunit
6+
7+
The following license applies to all parts of this software except as
8+
documented below:
9+
10+
====
11+
12+
Permission is hereby granted, free of charge, to any person obtaining
13+
a copy of this software and associated documentation files (the
14+
"Software"), to deal in the Software without restriction, including
15+
without limitation the rights to use, copy, modify, merge, publish,
16+
distribute, sublicense, and/or sell copies of the Software, and to
17+
permit persons to whom the Software is furnished to do so, subject to
18+
the following conditions:
19+
20+
The above copyright notice and this permission notice shall be
21+
included in all copies or substantial portions of the Software.
22+
23+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30+
31+
====
32+
33+
All files located in the node_modules and external directories are
34+
externally maintained libraries used by this software which have their
35+
own licenses; we recommend you read them, as their terms may differ from
36+
the terms above.

external/qunit/qunit.css

Lines changed: 96 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
/**
2-
* QUnit v1.10.0 - A JavaScript Unit Testing Framework
1+
/*!
2+
* QUnit 1.17.1
3+
* http://qunitjs.com/
34
*
4-
* http://qunitjs.com
5-
*
6-
* Copyright 2012 jQuery Foundation and other contributors
7-
* Released under the MIT license.
5+
* Copyright jQuery Foundation and other contributors
6+
* Released under the MIT license
87
* http://jquery.org/license
8+
*
9+
* Date: 2015-01-20T19:39Z
910
*/
1011

1112
/** Font Family and Sizes */
@@ -20,7 +21,7 @@
2021

2122
/** Resets */
2223

23-
#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
24+
#qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
2425
margin: 0;
2526
padding: 0;
2627
}
@@ -31,54 +32,63 @@
3132
#qunit-header {
3233
padding: 0.5em 0 0.5em 1em;
3334

34-
color: #8699a4;
35-
background-color: #0d3349;
35+
color: #8699A4;
36+
background-color: #0D3349;
3637

3738
font-size: 1.5em;
3839
line-height: 1em;
39-
font-weight: normal;
40+
font-weight: 400;
4041

4142
border-radius: 5px 5px 0 0;
42-
-moz-border-radius: 5px 5px 0 0;
43-
-webkit-border-top-right-radius: 5px;
44-
-webkit-border-top-left-radius: 5px;
4543
}
4644

4745
#qunit-header a {
4846
text-decoration: none;
49-
color: #c2ccd1;
47+
color: #C2CCD1;
5048
}
5149

5250
#qunit-header a:hover,
5351
#qunit-header a:focus {
54-
color: #fff;
52+
color: #FFF;
5553
}
5654

5755
#qunit-testrunner-toolbar label {
5856
display: inline-block;
59-
padding: 0 .5em 0 .1em;
57+
padding: 0 0.5em 0 0.1em;
6058
}
6159

6260
#qunit-banner {
6361
height: 5px;
6462
}
6563

6664
#qunit-testrunner-toolbar {
67-
padding: 0.5em 0 0.5em 2em;
65+
padding: 0.5em 1em 0.5em 1em;
6866
color: #5E740B;
69-
background-color: #eee;
67+
background-color: #EEE;
7068
overflow: hidden;
7169
}
7270

7371
#qunit-userAgent {
74-
padding: 0.5em 0 0.5em 2.5em;
75-
background-color: #2b81af;
76-
color: #fff;
72+
padding: 0.5em 1em 0.5em 1em;
73+
background-color: #2B81AF;
74+
color: #FFF;
7775
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
7876
}
7977

8078
#qunit-modulefilter-container {
8179
float: right;
80+
padding: 0.2em;
81+
}
82+
83+
.qunit-url-config {
84+
display: inline-block;
85+
padding: 0.1em;
86+
}
87+
88+
.qunit-filter {
89+
display: block;
90+
float: right;
91+
margin-left: 1em;
8292
}
8393

8494
/** Tests: Pass/Fail */
@@ -88,49 +98,72 @@
8898
}
8999

90100
#qunit-tests li {
91-
padding: 0.4em 0.5em 0.4em 2.5em;
92-
border-bottom: 1px solid #fff;
101+
padding: 0.4em 1em 0.4em 1em;
102+
border-bottom: 1px solid #FFF;
93103
list-style-position: inside;
94104
}
95105

96-
#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
106+
#qunit-tests > li {
107+
display: none;
108+
}
109+
110+
#qunit-tests li.running,
111+
#qunit-tests li.pass,
112+
#qunit-tests li.fail,
113+
#qunit-tests li.skipped {
114+
display: list-item;
115+
}
116+
117+
#qunit-tests.hidepass li.running,
118+
#qunit-tests.hidepass li.pass {
97119
display: none;
98120
}
99121

100122
#qunit-tests li strong {
101123
cursor: pointer;
102124
}
103125

126+
#qunit-tests li.skipped strong {
127+
cursor: default;
128+
}
129+
104130
#qunit-tests li a {
105131
padding: 0.5em;
106-
color: #c2ccd1;
132+
color: #C2CCD1;
107133
text-decoration: none;
108134
}
109135
#qunit-tests li a:hover,
110136
#qunit-tests li a:focus {
111137
color: #000;
112138
}
113139

114-
#qunit-tests ol {
140+
#qunit-tests li .runtime {
141+
float: right;
142+
font-size: smaller;
143+
}
144+
145+
.qunit-assert-list {
115146
margin-top: 0.5em;
116147
padding: 0.5em;
117148

118-
background-color: #fff;
149+
background-color: #FFF;
119150

120151
border-radius: 5px;
121-
-moz-border-radius: 5px;
122-
-webkit-border-radius: 5px;
152+
}
153+
154+
.qunit-collapsed {
155+
display: none;
123156
}
124157

125158
#qunit-tests table {
126159
border-collapse: collapse;
127-
margin-top: .2em;
160+
margin-top: 0.2em;
128161
}
129162

130163
#qunit-tests th {
131164
text-align: right;
132165
vertical-align: top;
133-
padding: 0 .5em 0 0;
166+
padding: 0 0.5em 0 0;
134167
}
135168

136169
#qunit-tests td {
@@ -144,84 +177,96 @@
144177
}
145178

146179
#qunit-tests del {
147-
background-color: #e0f2be;
148-
color: #374e0c;
180+
background-color: #E0F2BE;
181+
color: #374E0C;
149182
text-decoration: none;
150183
}
151184

152185
#qunit-tests ins {
153-
background-color: #ffcaca;
186+
background-color: #FFCACA;
154187
color: #500;
155188
text-decoration: none;
156189
}
157190

158191
/*** Test Counts */
159192

160-
#qunit-tests b.counts { color: black; }
193+
#qunit-tests b.counts { color: #000; }
161194
#qunit-tests b.passed { color: #5E740B; }
162195
#qunit-tests b.failed { color: #710909; }
163196

164197
#qunit-tests li li {
165198
padding: 5px;
166-
background-color: #fff;
199+
background-color: #FFF;
167200
border-bottom: none;
168201
list-style-position: inside;
169202
}
170203

171204
/*** Passing Styles */
172205

173206
#qunit-tests li li.pass {
174-
color: #3c510c;
175-
background-color: #fff;
207+
color: #3C510C;
208+
background-color: #FFF;
176209
border-left: 10px solid #C6E746;
177210
}
178211

179212
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
180213
#qunit-tests .pass .test-name { color: #366097; }
181214

182215
#qunit-tests .pass .test-actual,
183-
#qunit-tests .pass .test-expected { color: #999999; }
216+
#qunit-tests .pass .test-expected { color: #999; }
184217

185218
#qunit-banner.qunit-pass { background-color: #C6E746; }
186219

187220
/*** Failing Styles */
188221

189222
#qunit-tests li li.fail {
190223
color: #710909;
191-
background-color: #fff;
224+
background-color: #FFF;
192225
border-left: 10px solid #EE5757;
193226
white-space: pre;
194227
}
195228

196229
#qunit-tests > li:last-child {
197230
border-radius: 0 0 5px 5px;
198-
-moz-border-radius: 0 0 5px 5px;
199-
-webkit-border-bottom-right-radius: 5px;
200-
-webkit-border-bottom-left-radius: 5px;
201231
}
202232

203-
#qunit-tests .fail { color: #000000; background-color: #EE5757; }
233+
#qunit-tests .fail { color: #000; background-color: #EE5757; }
204234
#qunit-tests .fail .test-name,
205-
#qunit-tests .fail .module-name { color: #000000; }
235+
#qunit-tests .fail .module-name { color: #000; }
206236

207237
#qunit-tests .fail .test-actual { color: #EE5757; }
208-
#qunit-tests .fail .test-expected { color: green; }
238+
#qunit-tests .fail .test-expected { color: #008000; }
209239

210240
#qunit-banner.qunit-fail { background-color: #EE5757; }
211241

242+
/*** Skipped tests */
243+
244+
#qunit-tests .skipped {
245+
background-color: #EBECE9;
246+
}
247+
248+
#qunit-tests .qunit-skipped-label {
249+
background-color: #F4FF77;
250+
display: inline-block;
251+
font-style: normal;
252+
color: #366097;
253+
line-height: 1.8em;
254+
padding: 0 0.5em;
255+
margin: -0.4em 0.4em -0.4em 0;
256+
}
212257

213258
/** Result */
214259

215260
#qunit-testresult {
216-
padding: 0.5em 0.5em 0.5em 2.5em;
261+
padding: 0.5em 1em 0.5em 1em;
217262

218-
color: #2b81af;
263+
color: #2B81AF;
219264
background-color: #D2E0E6;
220265

221-
border-bottom: 1px solid white;
266+
border-bottom: 1px solid #FFF;
222267
}
223268
#qunit-testresult .module-name {
224-
font-weight: bold;
269+
font-weight: 700;
225270
}
226271

227272
/** Fixture */
@@ -232,4 +277,4 @@
232277
left: -10000px;
233278
width: 1000px;
234279
height: 1000px;
235-
}
280+
}

0 commit comments

Comments
 (0)