File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 75
75
return message + ( classes . length > 1 ? "es" : "" ) ;
76
76
}
77
77
78
- QUnit . extend ( QUnit . assert , {
78
+ // Custom modification: removing QUnit.extend
79
+ var key ;
80
+ var qunitAssertExtensions = {
79
81
hasClasses : function ( element , classes , message ) {
80
82
var classArray = splitClasses ( classes ) ,
81
83
results = check ( element , classArray ) ;
233
235
message : message
234
236
} ) ;
235
237
}
236
- } ) ;
238
+ } ;
239
+
240
+ // Custom modification: removing QUnit.extend
241
+ for ( key in qunitAssertExtensions ) {
242
+ QUnit . assert [ key ] = qunitAssertExtensions [ key ] ;
243
+ }
244
+
237
245
} ) ) ;
Original file line number Diff line number Diff line change 14
14
else if ( typeof module !== "undefined" && module && module . exports && typeof require === "function" ) {
15
15
module . exports = factory ( require ( "qunitjs" ) ) ;
16
16
}
17
- // For CommonJS with `exports`, but without `module.exports`, like Rhino
18
- else if ( typeof exports !== "undefined" && exports && typeof require === "function" ) {
19
- var qunit = require ( "qunitjs" ) ;
20
- qunit . extend ( exports , factory ( qunit ) ) ;
21
- }
17
+
18
+ // Custom modification: remove the non-Node.js CommonJS part due to its
19
+ // usage of QUnit.extend.
20
+ //
22
21
// For browser globals
23
22
else {
24
23
factory ( QUnit ) ;
194
193
} ) ;
195
194
} ;
196
195
197
-
196
+ var key ;
198
197
var api = {
199
198
close : close ,
200
199
notClose : notClose ,
201
200
closePercent : close . percent ,
202
201
notClosePercent : notClose . percent
203
202
} ;
204
203
205
- QUnit . extend ( QUnit . assert , api ) ;
204
+ for ( key in api ) {
205
+ QUnit . assert [ key ] = api [ key ] ;
206
+ }
206
207
207
208
return api ;
208
209
} ) ) ;
You can’t perform that action at this time.
0 commit comments