Build: Fork vendors to remove QUnit deprecated API usage

Changes:
* add `tests/lib/vendor/**/*` to `.eslintignore`
* move `qunit-composite` to `tests/lib` so that we can modify it
* move `qunit-assert-classes` to `tests/lib` so that we can modify it
* move `qunit-assert-close` to `tests/lib` so that we can modify it
* replace `assert.push` with `assert.pushResult`
* remove usage of `QUnit.extend`

Closes gh-2157
This commit is contained in:
Michał Gołębiowski-Owczarek 2023-03-30 09:56:33 +02:00 committed by Michał Gołębiowski-Owczarek
parent f68d655aff
commit 546214e869
39 changed files with 241 additions and 109 deletions

View File

@ -1,3 +1,4 @@
dist/**/* dist/**/*
external/**/* external/**/*
tests/lib/vendor/**/*
ui/vendor/**/* ui/vendor/**/*

View File

@ -272,18 +272,6 @@ grunt.initConfig( {
"qunit/qunit.css": "qunit/qunit/qunit.css", "qunit/qunit.css": "qunit/qunit/qunit.css",
"qunit/LICENSE.txt": "qunit/LICENSE.txt", "qunit/LICENSE.txt": "qunit/LICENSE.txt",
"qunit-assert-classes/qunit-assert-classes.js":
"qunit-assert-classes/qunit-assert-classes.js",
"qunit-assert-classes/LICENSE.txt": "qunit-assert-classes/LICENSE",
"qunit-assert-close/qunit-assert-close.js":
"qunit-assert-close/qunit-assert-close.js",
"qunit-assert-close/MIT-LICENSE.txt": "qunit-assert-close/MIT-LICENSE.txt",
"qunit-composite/qunit-composite.js": "qunit-composite/qunit-composite.js",
"qunit-composite/qunit-composite.css": "qunit-composite/qunit-composite.css",
"qunit-composite/LICENSE.txt": "qunit-composite/LICENSE.txt",
"requirejs/require.js": "requirejs/require.js", "requirejs/require.js": "requirejs/require.js",
"jquery-mousewheel/jquery.mousewheel.js": "jquery-mousewheel/jquery.mousewheel.js", "jquery-mousewheel/jquery.mousewheel.js": "jquery-mousewheel/jquery.mousewheel.js",

View File

@ -16,9 +16,6 @@
"jquery-mousewheel": "3.1.12", "jquery-mousewheel": "3.1.12",
"jquery-simulate": "1.1.1", "jquery-simulate": "1.1.1",
"qunit": "2.19.4", "qunit": "2.19.4",
"qunit-assert-classes": "1.0.2",
"qunit-assert-close": "JamesMGreene/qunit-assert-close#v2.1.2",
"qunit-composite": "JamesMGreene/qunit-composite#v2.0.0",
"requirejs": "2.1.14", "requirejs": "2.1.14",
"jquery-1.8.0": "jquery#1.8.0", "jquery-1.8.0": "jquery#1.8.0",

View File

@ -12,8 +12,8 @@ requirejs.config( {
"jquery-simulate": "../../../external/jquery-simulate/jquery.simulate", "jquery-simulate": "../../../external/jquery-simulate/jquery.simulate",
"lib": "../../lib", "lib": "../../lib",
"phantom-bridge": "../../../node_modules/grunt-contrib-qunit/phantomjs/bridge", "phantom-bridge": "../../../node_modules/grunt-contrib-qunit/phantomjs/bridge",
"qunit-assert-classes": "../../../external/qunit-assert-classes/qunit-assert-classes", "qunit-assert-classes": "../../lib/vendor/qunit-assert-classes/qunit-assert-classes",
"qunit-assert-close": "../../../external/qunit-assert-close/qunit-assert-close", "qunit-assert-close": "../../lib/vendor/qunit-assert-close/qunit-assert-close",
"qunit": "../../../external/qunit/qunit", "qunit": "../../../external/qunit/qunit",
"testswarm": "https://swarm.jquery.org/js/inject.js?" + ( new Date() ).getTime(), "testswarm": "https://swarm.jquery.org/js/inject.js?" + ( new Date() ).getTime(),
"ui": "../../../ui" "ui": "../../../ui"

View File

@ -15,11 +15,16 @@ var domEqual = QUnit.assert.domEqual = function( selector, modifier, message ) {
var assert = this; var assert = this;
// Get current state prior to modifier // Get current state prior to modifier
var expected = extract( selector, message ); var expected = extract( assert, selector, message );
function done() { function done() {
var actual = extract( selector, message ); var actual = extract( assert, selector, message );
assert.push( QUnit.equiv( actual, expected ), actual, expected, message ); assert.pushResult( {
result: QUnit.equiv( actual, expected ),
actual: actual,
expected: expected,
message: message
} );
} }
// Run modifier (async or sync), then compare state via done() // Run modifier (async or sync), then compare state via done()
@ -116,11 +121,15 @@ function jQueryVersionSince( version ) {
return compareVersions( $.fn.jquery, version ) >= 0; return compareVersions( $.fn.jquery, version ) >= 0;
} }
function extract( selector, message ) { function extract( assert, selector, message ) {
var elem = $( selector ); var elem = $( selector );
if ( !elem.length ) { if ( !elem.length ) {
QUnit.push( false, null, null, assert.pushResult( {
"domEqual failed, can't extract " + selector + ", message was: " + message ); result: false,
actual: null,
expected: null,
message: "domEqual failed, can't extract " + selector + ", message was: " + message
} );
return; return;
} }
@ -190,7 +199,7 @@ function extract( selector, message ) {
children = elem.children(); children = elem.children();
if ( children.length ) { if ( children.length ) {
result.children = elem.children().map( function() { result.children = elem.children().map( function() {
return extract( $( this ) ); return extract( assert, $( this ) );
} ).get(); } ).get();
} else { } else {
result.text = elem.text(); result.text = elem.text();

View File

@ -1,3 +1,5 @@
// With custom modifications - all are marked with
// a "Custom modification" comment.
( function( factory ) { ( function( factory ) {
if ( typeof define === "function" && define.amd ) { if ( typeof define === "function" && define.amd ) {
@ -73,14 +75,22 @@
return message + ( classes.length > 1 ? "es" : "" ); return message + ( classes.length > 1 ? "es" : "" );
} }
QUnit.extend( QUnit.assert, { // Custom modification: removing QUnit.extend
var key;
var qunitAssertExtensions = {
hasClasses: function( element, classes, message ) { hasClasses: function( element, classes, message ) {
var classArray = splitClasses( classes ), var classArray = splitClasses( classes ),
results = check( element, classArray ); results = check( element, classArray );
message = message || pluralize( "Element must have class", classArray ); message = message || pluralize( "Element must have class", classArray );
this.push( !results.missing.length, results.found.join( " " ), classes, message ); // Custom modification: push -> pushResult
this.pushResult( {
result: !results.missing.length,
actual: results.found.join( " " ),
expected: classes,
message: message
} );
}, },
lacksClasses: function( element, classes, message ) { lacksClasses: function( element, classes, message ) {
var classArray = splitClasses( classes ), var classArray = splitClasses( classes ),
@ -88,7 +98,13 @@
message = message || pluralize( "Element must not have class", classArray ); message = message || pluralize( "Element must not have class", classArray );
this.push( !results.found.length, results.found.join( " " ), classes, message ); // Custom modification: push -> pushResult
this.pushResult( {
result: !results.found.length,
actual: results.found.join( " " ),
expected: classes,
message: message
} );
}, },
hasClassesStrict: function( element, classes, message ) { hasClassesStrict: function( element, classes, message ) {
var result, var result,
@ -101,49 +117,91 @@
splitClasses( results.element.getAttribute( "class" ) ).length === splitClasses( results.element.getAttribute( "class" ) ).length ===
results.found.length; results.found.length;
this.push( result, results.found.join( " " ), classes, message ); // Custom modification: push -> pushResult
this.pushResult( {
result: result,
actual: results.found.join( " " ),
expected: classes,
message: message
} );
}, },
hasClassRegex: function( element, regex, message ) { hasClassRegex: function( element, regex, message ) {
var results = check( element, regex ); var results = check( element, regex );
message = message || "Element must have class matching " + regex; message = message || "Element must have class matching " + regex;
this.push( !!results.found.length, results.found.join( " " ), regex, message ); // Custom modification: push -> pushResult
this.pushResult( {
result: !!results.found.length,
actual: results.found.join( " " ),
expected: regex,
message: message
} );
}, },
lacksClassRegex: function( element, regex, message ) { lacksClassRegex: function( element, regex, message ) {
var results = check( element, regex ); var results = check( element, regex );
message = message || "Element must not have class matching " + regex; message = message || "Element must not have class matching " + regex;
this.push( results.missing.length, results.missing.join( " " ), regex, message ); // Custom modification: push -> pushResult
this.pushResult( {
result: results.missing.length,
actual: results.missing.join( " " ),
expected: regex,
message: message
} );
}, },
hasClassStart: function( element, partialClass, message ) { hasClassStart: function( element, partialClass, message ) {
var results = check( element, new RegExp( "^" + partialClass ) ); var results = check( element, new RegExp( "^" + partialClass ) );
message = message || "Element must have class starting with " + partialClass; message = message || "Element must have class starting with " + partialClass;
this.push( results.found.length, results.found.join( " " ), partialClass, message ); // Custom modification: push -> pushResult
this.pushResult( {
result: results.found.length,
actual: results.found.join( " " ),
expected: partialClass,
message: message
} );
}, },
lacksClassStart: function( element, partialClass, message ) { lacksClassStart: function( element, partialClass, message ) {
var results = check( element, new RegExp( "^" + partialClass ) ); var results = check( element, new RegExp( "^" + partialClass ) );
message = message || "Element must not have class starting with " + partialClass; message = message || "Element must not have class starting with " + partialClass;
this.push( results.missing.length, results.missing.join( " " ), partialClass, message ); // Custom modification: push -> pushResult
this.pushResult( {
result: results.missing.length,
actual: results.missing.join( " " ),
expected: partialClass,
message: message
} );
}, },
hasClassPartial: function( element, partialClass, message ) { hasClassPartial: function( element, partialClass, message ) {
var results = check( element, new RegExp( partialClass ) ); var results = check( element, new RegExp( partialClass ) );
message = message || "Element must have class containing '" + partialClass + "'"; message = message || "Element must have class containing '" + partialClass + "'";
this.push( results.found.length, results.found.join( " " ), partialClass, message ); // Custom modification: push -> pushResult
this.pushResult( {
result: results.found.length,
actual: results.found.join( " " ),
expected: partialClass,
message: message
} );
}, },
lacksClassPartial: function( element, partialClass, message ) { lacksClassPartial: function( element, partialClass, message ) {
var results = check( element, new RegExp( partialClass ) ); var results = check( element, new RegExp( partialClass ) );
message = message || "Element must not have class containing '" + partialClass + "'"; message = message || "Element must not have class containing '" + partialClass + "'";
this.push( results.missing.length, results.missing.join( " " ), partialClass, message ); // Custom modification: push -> pushResult
this.pushResult( {
result: results.missing.length,
actual: results.missing.join( " " ),
expected: partialClass,
message: message
} );
}, },
lacksAllClasses: function( element, message ) { lacksAllClasses: function( element, message ) {
element = element.jquery ? element[ 0 ] : element; element = element.jquery ? element[ 0 ] : element;
@ -153,7 +211,13 @@
message = message || "Element must not have any classes"; message = message || "Element must not have any classes";
this.push( !classes.length, !classes.length, true, message ); // Custom modification: push -> pushResult
this.pushResult( {
result: !classes.length,
actual: !classes.length,
expected: true,
message: message
} );
}, },
hasSomeClass: function( element, message ) { hasSomeClass: function( element, message ) {
element = element.jquery ? element[ 0 ] : element; element = element.jquery ? element[ 0 ] : element;
@ -163,7 +227,19 @@
message = message || "Element must have a class"; message = message || "Element must have a class";
this.push( classes.length, classes.length, true, message ); // Custom modification: push -> pushResult
this.pushResult( {
result: classes.length,
actual: classes.length,
expected: true,
message: message
} );
} }
}); };
// Custom modification: removing QUnit.extend
for ( key in qunitAssertExtensions ) {
QUnit.assert[ key ] = qunitAssertExtensions[ key ];
}
} ) ); } ) );

View File

@ -1,3 +1,5 @@
// With custom modifications - all are marked with
// a "Custom modification" comment.
(function(factory) { (function(factory) {
// NOTE: // NOTE:
@ -12,11 +14,10 @@
else if (typeof module !== "undefined" && module && module.exports && typeof require === "function") { else if (typeof module !== "undefined" && module && module.exports && typeof require === "function") {
module.exports = factory(require("qunitjs")); module.exports = factory(require("qunitjs"));
} }
// For CommonJS with `exports`, but without `module.exports`, like Rhino
else if (typeof exports !== "undefined" && exports && typeof require === "function") { // Custom modification: remove the non-Node.js CommonJS part due to its
var qunit = require("qunitjs"); // usage of QUnit.extend.
qunit.extend(exports, factory(qunit)); //
}
// For browser globals // For browser globals
else { else {
factory(QUnit); factory(QUnit);
@ -75,7 +76,13 @@
message = message || (actual + " should be within " + maxDifference + " (inclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff)); message = message || (actual + " should be within " + maxDifference + " (inclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff));
pushContext.push(result, actual, expected, message); // Custom modification: push -> pushResult
pushContext.pushResult({
result: result,
actual: actual,
expected: expected,
message: message
});
} }
@ -109,7 +116,13 @@
} }
message = message || (actual + " should be within " + maxPercentDifference + "% (inclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff + "%")); message = message || (actual + " should be within " + maxPercentDifference + "% (inclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff + "%"));
pushContext.push(result, actual, expected, message); // Custom modification: push -> pushResult
pushContext.pushResult({
result: result,
actual: actual,
expected: expected,
message: message
});
}; };
@ -131,7 +144,13 @@
message = message || (actual + " should not be within " + minDifference + " (exclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff)); message = message || (actual + " should not be within " + minDifference + " (exclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff));
pushContext.push(result, actual, expected, message); // Custom modification: push -> pushResult
pushContext.pushResult({
result: result,
actual: actual,
expected: expected,
message: message
});
} }
@ -165,10 +184,16 @@
} }
message = message || (actual + " should not be within " + minPercentDifference + "% (exclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff + "%")); message = message || (actual + " should not be within " + minPercentDifference + "% (exclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff + "%"));
pushContext.push(result, actual, expected, message); // Custom modification: push -> pushResult
pushContext.pushResult({
result: result,
actual: actual,
expected: expected,
message: message
});
}; };
var key;
var api = { var api = {
close: close, close: close,
notClose: notClose, notClose: notClose,
@ -176,7 +201,9 @@
notClosePercent: notClose.percent notClosePercent: notClose.percent
}; };
QUnit.extend(QUnit.assert, api); for (key in api) {
QUnit.assert[key] = api[key];
}
return api; return api;
})); }));

View File

@ -1,6 +1,9 @@
/** /**
* QUnit Composite * QUnit Composite
* *
* With custom modifications - all are marked with
* a "Custom modification" comment.
*
* https://github.com/JamesMGreene/qunit-composite * https://github.com/JamesMGreene/qunit-composite
* *
* Copyright jQuery Foundation and other contributors * Copyright jQuery Foundation and other contributors
@ -93,7 +96,12 @@ function initIframe() {
// Pass all test details through to the main page // Pass all test details through to the main page
var message = ( moduleName ? moduleName + ": " : "" ) + testName + ": " + ( data.message || ( data.result ? "okay" : "failed" ) ); var message = ( moduleName ? moduleName + ": " : "" ) + testName + ": " + ( data.message || ( data.result ? "okay" : "failed" ) );
suiteAssert.expect( ++count ); suiteAssert.expect( ++count );
suiteAssert.push( data.result, data.actual, data.expected, message ); suiteAssert.pushResult( {
result: data.result,
actual: data.actual,
expected: data.expected,
message: message
} );
}); });
// Continue the outer test when the iframe's test is done // Continue the outer test when the iframe's test is done

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../external/jquery/jquery.js"></script> <script src="../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../external/qunit/qunit.js"></script> <script src="../../external/qunit/qunit.js"></script>
<script src="../../external/qunit-composite/qunit-composite.js"></script> <script src="../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script> <script>
(function() { (function() {

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -11,23 +11,39 @@ define( [
QUnit.module( "core - selectors", { afterEach: helper.moduleAfterEach } ); QUnit.module( "core - selectors", { afterEach: helper.moduleAfterEach } );
QUnit.assert.isFocusable = function( selector, msg ) { QUnit.assert.isFocusable = function( selector, msg ) {
this.push( $( selector ).is( ":focusable" ), null, null, this.pushResult( {
msg + " - selector " + selector + " is focusable" ); result: $( selector ).is( ":focusable" ),
actual: null,
expected: null,
message: msg + " - selector " + selector + " is focusable"
} );
}; };
QUnit.assert.isNotFocusable = function( selector, msg ) { QUnit.assert.isNotFocusable = function( selector, msg ) {
this.push( $( selector ).length && !$( selector ).is( ":focusable" ), null, null, this.pushResult( {
msg + " - selector " + selector + " is not focusable" ); result: $( selector ).length && !$( selector ).is( ":focusable" ),
actual: null,
expected: null,
message: msg + " - selector " + selector + " is not focusable"
} );
}; };
QUnit.assert.isTabbable = function( selector, msg ) { QUnit.assert.isTabbable = function( selector, msg ) {
this.push( $( selector ).is( ":tabbable" ), null, null, this.pushResult( {
msg + " - selector " + selector + " is tabbable" ); result: $( selector ).is( ":tabbable" ),
actual: null,
expected: null,
message: msg + " - selector " + selector + " is tabbable"
} );
}; };
QUnit.assert.isNotTabbable = function( selector, msg ) { QUnit.assert.isNotTabbable = function( selector, msg ) {
this.push( $( selector ).length && !$( selector ).is( ":tabbable" ), null, null, this.pushResult( {
msg + " - selector " + selector + " is not tabbable" ); result: $( selector ).length && !$( selector ).is( ":tabbable" ),
actual: null,
expected: null,
message: msg + " - selector " + selector + " is not tabbable"
} );
}; };
QUnit.test( "data", function( assert ) { QUnit.test( "data", function( assert ) {

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -23,11 +23,21 @@ define( [
"use strict"; "use strict";
QUnit.assert.present = function( value, array, message ) { QUnit.assert.present = function( value, array, message ) {
this.push( jQuery.inArray( value, array ) !== -1, value, array, message ); this.pushResult( {
result: jQuery.inArray( value, array ) !== -1,
actual: value,
expected: array,
message: message
} );
}; };
QUnit.assert.notPresent = function( value, array, message ) { QUnit.assert.notPresent = function( value, array, message ) {
this.push( jQuery.inArray( value, array ) === -1, value, array, message ); this.pushResult( {
result: jQuery.inArray( value, array ) === -1,
actual: value,
expected: array,
message: message
} );
}; };
// MinDuration is used for "short" animate tests where we are only concerned about the final // MinDuration is used for "short" animate tests where we are only concerned about the final

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>

View File

@ -7,9 +7,9 @@
<script src="../../../external/jquery/jquery.js"></script> <script src="../../../external/jquery/jquery.js"></script>
<link rel="stylesheet" href="../../../external/qunit/qunit.css"> <link rel="stylesheet" href="../../../external/qunit/qunit.css">
<link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css">
<script src="../../../external/qunit/qunit.js"></script> <script src="../../../external/qunit/qunit.js"></script>
<script src="../../../external/qunit-composite/qunit-composite.js"></script> <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script>
<script src="../subsuite.js"></script> <script src="../subsuite.js"></script>
<script> <script>