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 7575 return message + ( classes . length > 1 ? "es" : "" ) ;
7676 }
7777
78- QUnit . extend ( QUnit . assert , {
78+ // Custom modification: removing QUnit.extend
79+ var key ;
80+ var qunitAssertExtensions = {
7981 hasClasses : function ( element , classes , message ) {
8082 var classArray = splitClasses ( classes ) ,
8183 results = check ( element , classArray ) ;
233235 message : message
234236 } ) ;
235237 }
236- } ) ;
238+ } ;
239+
240+ // Custom modification: removing QUnit.extend
241+ for ( key in qunitAssertExtensions ) {
242+ QUnit . assert [ key ] = qunitAssertExtensions [ key ] ;
243+ }
244+
237245} ) ) ;
Original file line number Diff line number Diff line change 1414 else if ( typeof module !== "undefined" && module && module . exports && typeof require === "function" ) {
1515 module . exports = factory ( require ( "qunitjs" ) ) ;
1616 }
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+ //
2221 // For browser globals
2322 else {
2423 factory ( QUnit ) ;
194193 } ) ;
195194 } ;
196195
197-
196+ var key ;
198197 var api = {
199198 close : close ,
200199 notClose : notClose ,
201200 closePercent : close . percent ,
202201 notClosePercent : notClose . percent
203202 } ;
204203
205- QUnit . extend ( QUnit . assert , api ) ;
204+ for ( key in api ) {
205+ QUnit . assert [ key ] = api [ key ] ;
206+ }
206207
207208 return api ;
208209} ) ) ;
You can’t perform that action at this time.
0 commit comments