mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Build: Update dependencies, including QUnit 1 -> 2
Also, fix htmllint lang exclusion patterns. Ref gh-2157
This commit is contained in:
parent
43ed5c94aa
commit
f68d655aff
@ -182,8 +182,10 @@ grunt.initConfig( {
|
||||
good: {
|
||||
options: {
|
||||
ignore: [
|
||||
/The text content of element “script” was not in the required format: Expected space, tab, newline, or slash but found “.” instead/
|
||||
] },
|
||||
/The text content of element “script” was not in the required format: Expected space, tab, newline, or slash but found “.” instead/,
|
||||
/This document appears to be written in .*. Consider using “lang=".*"” \(or variant\) instead/
|
||||
]
|
||||
},
|
||||
src: [
|
||||
"{demos,tests}/**/*.html",
|
||||
...htmllintBad.map( pattern => `!${ pattern }` )
|
||||
@ -197,7 +199,7 @@ grunt.initConfig( {
|
||||
/Element “object” is missing one or more of the following/,
|
||||
/The “codebase” attribute on the “object” element is obsolete/,
|
||||
/Consider adding a “lang” attribute to the “html” start tag/,
|
||||
/This document appears to be written in .*. Consider adding “lang=".*"” \(or variant\) to the “html” start tag/
|
||||
/This document appears to be written in .*. Consider (?:adding|using) “lang=".*"” \(or variant\)/
|
||||
]
|
||||
},
|
||||
src: htmllintBad
|
||||
|
@ -15,10 +15,10 @@
|
||||
"jquery-color": "2.2.0",
|
||||
"jquery-mousewheel": "3.1.12",
|
||||
"jquery-simulate": "1.1.1",
|
||||
"qunit": "1.18.0",
|
||||
"qunit": "2.19.4",
|
||||
"qunit-assert-classes": "1.0.2",
|
||||
"qunit-assert-close": "JamesMGreene/qunit-assert-close#v1.1.1",
|
||||
"qunit-composite": "JamesMGreene/qunit-composite#v1.1.0",
|
||||
"qunit-assert-close": "JamesMGreene/qunit-assert-close#v2.1.2",
|
||||
"qunit-composite": "JamesMGreene/qunit-composite#v2.0.0",
|
||||
"requirejs": "2.1.14",
|
||||
|
||||
"jquery-1.8.0": "jquery#1.8.0",
|
||||
|
258
external/qunit-assert-close/qunit-assert-close.js
vendored
258
external/qunit-assert-close/qunit-assert-close.js
vendored
@ -1,106 +1,182 @@
|
||||
/**
|
||||
* Checks that the first two arguments are equal, or are numbers close enough to be considered equal
|
||||
* based on a specified maximum allowable difference.
|
||||
*
|
||||
* @example assert.close(3.141, Math.PI, 0.001);
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number maxDifference (the maximum inclusive difference allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
function close(actual, expected, maxDifference, message) {
|
||||
var actualDiff = (actual === expected) ? 0 : Math.abs(actual - expected),
|
||||
result = actualDiff <= maxDifference;
|
||||
message = message || (actual + " should be within " + maxDifference + " (inclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff));
|
||||
QUnit.push(result, actual, expected, message);
|
||||
}
|
||||
(function(factory) {
|
||||
|
||||
// NOTE:
|
||||
// All techniques except for the "browser globals" fallback will extend the
|
||||
// provided QUnit object but return the isolated API methods
|
||||
|
||||
/**
|
||||
* Checks that the first two arguments are equal, or are numbers close enough to be considered equal
|
||||
* based on a specified maximum allowable difference percentage.
|
||||
*
|
||||
* @example assert.close.percent(155, 150, 3.4); // Difference is ~3.33%
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number maxPercentDifference (the maximum inclusive difference percentage allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
close.percent = function closePercent(actual, expected, maxPercentDifference, message) {
|
||||
var actualDiff, result;
|
||||
if (actual === expected) {
|
||||
actualDiff = 0;
|
||||
result = actualDiff <= maxPercentDifference;
|
||||
// For AMD: Register as an anonymous AMD module with a named dependency on "qunit".
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(["qunit"], factory);
|
||||
}
|
||||
else if (actual !== 0 && expected !== 0 && expected !== Infinity && expected !== -Infinity) {
|
||||
actualDiff = Math.abs(100 * (actual - expected) / expected);
|
||||
result = actualDiff <= maxPercentDifference;
|
||||
// For Node.js
|
||||
else if (typeof module !== "undefined" && module && module.exports && typeof require === "function") {
|
||||
module.exports = factory(require("qunitjs"));
|
||||
}
|
||||
// For CommonJS with `exports`, but without `module.exports`, like Rhino
|
||||
else if (typeof exports !== "undefined" && exports && typeof require === "function") {
|
||||
var qunit = require("qunitjs");
|
||||
qunit.extend(exports, factory(qunit));
|
||||
}
|
||||
// For browser globals
|
||||
else {
|
||||
// Dividing by zero (0)! Should return `false` unless the max percentage was `Infinity`
|
||||
actualDiff = Infinity;
|
||||
result = maxPercentDifference === Infinity;
|
||||
factory(QUnit);
|
||||
}
|
||||
message = message || (actual + " should be within " + maxPercentDifference + "% (inclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff + "%"));
|
||||
|
||||
QUnit.push(result, actual, expected, message);
|
||||
};
|
||||
}(function(QUnit) {
|
||||
|
||||
/**
|
||||
* Find an appropriate `Assert` context to `push` results to.
|
||||
* @param * context - An unknown context, possibly `Assert`, `Test`, or neither
|
||||
* @private
|
||||
*/
|
||||
function _getPushContext(context) {
|
||||
var pushContext;
|
||||
|
||||
/**
|
||||
* Checks that the first two arguments are numbers with differences greater than the specified
|
||||
* minimum difference.
|
||||
*
|
||||
* @example assert.notClose(3.1, Math.PI, 0.001);
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number minDifference (the minimum exclusive difference allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
function notClose(actual, expected, minDifference, message) {
|
||||
var actualDiff = Math.abs(actual - expected),
|
||||
result = actualDiff > minDifference;
|
||||
message = message || (actual + " should not be within " + minDifference + " (exclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff));
|
||||
QUnit.push(result, actual, expected, message);
|
||||
}
|
||||
if (context && typeof context.push === "function") {
|
||||
// `context` is an `Assert` context
|
||||
pushContext = context;
|
||||
}
|
||||
else if (context && context.assert && typeof context.assert.push === "function") {
|
||||
// `context` is a `Test` context
|
||||
pushContext = context.assert;
|
||||
}
|
||||
else if (
|
||||
QUnit && QUnit.config && QUnit.config.current && QUnit.config.current.assert &&
|
||||
typeof QUnit.config.current.assert.push === "function"
|
||||
) {
|
||||
// `context` is an unknown context but we can find the `Assert` context via QUnit
|
||||
pushContext = QUnit.config.current.assert;
|
||||
}
|
||||
else if (QUnit && typeof QUnit.push === "function") {
|
||||
pushContext = QUnit.push;
|
||||
}
|
||||
else {
|
||||
throw new Error("Could not find the QUnit `Assert` context to push results");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks that the first two arguments are numbers with differences greater than the specified
|
||||
* minimum difference percentage.
|
||||
*
|
||||
* @example assert.notClose.percent(156, 150, 3.5); // Difference is 4.0%
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number minPercentDifference (the minimum exclusive difference percentage allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
notClose.percent = function notClosePercent(actual, expected, minPercentDifference, message) {
|
||||
var actualDiff, result;
|
||||
if (actual === expected) {
|
||||
actualDiff = 0;
|
||||
result = actualDiff > minPercentDifference;
|
||||
return pushContext;
|
||||
}
|
||||
else if (actual !== 0 && expected !== 0 && expected !== Infinity && expected !== -Infinity) {
|
||||
actualDiff = Math.abs(100 * (actual - expected) / expected);
|
||||
result = actualDiff > minPercentDifference;
|
||||
|
||||
/**
|
||||
* Checks that the first two arguments are equal, or are numbers close enough to be considered equal
|
||||
* based on a specified maximum allowable difference.
|
||||
*
|
||||
* @example assert.close(3.141, Math.PI, 0.001);
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number maxDifference (the maximum inclusive difference allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
function close(actual, expected, maxDifference, message) {
|
||||
var actualDiff = (actual === expected) ? 0 : Math.abs(actual - expected),
|
||||
result = actualDiff <= maxDifference,
|
||||
pushContext = _getPushContext(this);
|
||||
|
||||
message = message || (actual + " should be within " + maxDifference + " (inclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff));
|
||||
|
||||
pushContext.push(result, actual, expected, message);
|
||||
}
|
||||
else {
|
||||
// Dividing by zero (0)! Should only return `true` if the min percentage was `Infinity`
|
||||
actualDiff = Infinity;
|
||||
result = minPercentDifference !== Infinity;
|
||||
|
||||
|
||||
/**
|
||||
* Checks that the first two arguments are equal, or are numbers close enough to be considered equal
|
||||
* based on a specified maximum allowable difference percentage.
|
||||
*
|
||||
* @example assert.close.percent(155, 150, 3.4); // Difference is ~3.33%
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number maxPercentDifference (the maximum inclusive difference percentage allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
close.percent = function closePercent(actual, expected, maxPercentDifference, message) {
|
||||
var actualDiff, result,
|
||||
pushContext = _getPushContext(this);
|
||||
|
||||
if (actual === expected) {
|
||||
actualDiff = 0;
|
||||
result = actualDiff <= maxPercentDifference;
|
||||
}
|
||||
else if (actual !== 0 && expected !== 0 && expected !== Infinity && expected !== -Infinity) {
|
||||
actualDiff = Math.abs(100 * (actual - expected) / expected);
|
||||
result = actualDiff <= maxPercentDifference;
|
||||
}
|
||||
else {
|
||||
// Dividing by zero (0)! Should return `false` unless the max percentage was `Infinity`
|
||||
actualDiff = Infinity;
|
||||
result = maxPercentDifference === Infinity;
|
||||
}
|
||||
message = message || (actual + " should be within " + maxPercentDifference + "% (inclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff + "%"));
|
||||
|
||||
pushContext.push(result, actual, expected, message);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Checks that the first two arguments are numbers with differences greater than the specified
|
||||
* minimum difference.
|
||||
*
|
||||
* @example assert.notClose(3.1, Math.PI, 0.001);
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number minDifference (the minimum exclusive difference allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
function notClose(actual, expected, minDifference, message) {
|
||||
var actualDiff = Math.abs(actual - expected),
|
||||
result = actualDiff > minDifference,
|
||||
pushContext = _getPushContext(this);
|
||||
|
||||
message = message || (actual + " should not be within " + minDifference + " (exclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff));
|
||||
|
||||
pushContext.push(result, actual, expected, message);
|
||||
}
|
||||
message = message || (actual + " should not be within " + minPercentDifference + "% (exclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff + "%"));
|
||||
|
||||
QUnit.push(result, actual, expected, message);
|
||||
};
|
||||
|
||||
|
||||
QUnit.extend(QUnit.assert, {
|
||||
close: close,
|
||||
notClose: notClose
|
||||
});
|
||||
/**
|
||||
* Checks that the first two arguments are numbers with differences greater than the specified
|
||||
* minimum difference percentage.
|
||||
*
|
||||
* @example assert.notClose.percent(156, 150, 3.5); // Difference is 4.0%
|
||||
*
|
||||
* @param Number actual
|
||||
* @param Number expected
|
||||
* @param Number minPercentDifference (the minimum exclusive difference percentage allowed between the actual and expected numbers)
|
||||
* @param String message (optional)
|
||||
*/
|
||||
notClose.percent = function notClosePercent(actual, expected, minPercentDifference, message) {
|
||||
var actualDiff, result,
|
||||
pushContext = _getPushContext(this);
|
||||
|
||||
if (actual === expected) {
|
||||
actualDiff = 0;
|
||||
result = actualDiff > minPercentDifference;
|
||||
}
|
||||
else if (actual !== 0 && expected !== 0 && expected !== Infinity && expected !== -Infinity) {
|
||||
actualDiff = Math.abs(100 * (actual - expected) / expected);
|
||||
result = actualDiff > minPercentDifference;
|
||||
}
|
||||
else {
|
||||
// Dividing by zero (0)! Should only return `true` if the min percentage was `Infinity`
|
||||
actualDiff = Infinity;
|
||||
result = minPercentDifference !== Infinity;
|
||||
}
|
||||
message = message || (actual + " should not be within " + minPercentDifference + "% (exclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff + "%"));
|
||||
|
||||
pushContext.push(result, actual, expected, message);
|
||||
};
|
||||
|
||||
|
||||
var api = {
|
||||
close: close,
|
||||
notClose: notClose,
|
||||
closePercent: close.percent,
|
||||
notClosePercent: notClose.percent
|
||||
};
|
||||
|
||||
QUnit.extend(QUnit.assert, api);
|
||||
|
||||
return api;
|
||||
}));
|
||||
|
34
external/qunit-composite/qunit-composite.css
vendored
34
external/qunit-composite/qunit-composite.css
vendored
@ -11,3 +11,37 @@
|
||||
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#qunit-testsuites {
|
||||
margin: 0;
|
||||
padding: 0.5em 1.0em;
|
||||
font-family: "Helvetica Neue Light","HelveticaNeue-Light","Helvetica Neue",Calibri,Helvetica,Arial,sans-serif;
|
||||
font-size: small;
|
||||
background-color: #d2e0e6;
|
||||
border-bottom: 1px solid #fff;
|
||||
}
|
||||
|
||||
#qunit-testsuites a {
|
||||
color: #00c;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-testsuites a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#qunit-testsuites > li {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#qunit-testsuites > li:first-child::before {
|
||||
content: "Suites: ";
|
||||
}
|
||||
|
||||
#qunit-testsuites > li + li::before {
|
||||
content: "|\a0";
|
||||
}
|
||||
|
||||
#qunit-testsuites > li::after {
|
||||
content: "\a0";
|
||||
}
|
||||
|
67
external/qunit-composite/qunit-composite.js
vendored
67
external/qunit-composite/qunit-composite.js
vendored
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* QUnit Composite v1.0.5-pre
|
||||
* QUnit Composite
|
||||
*
|
||||
* https://github.com/JamesMGreene/qunit-composite
|
||||
*
|
||||
@ -14,7 +14,7 @@
|
||||
factory( QUnit );
|
||||
}
|
||||
}(function( QUnit ) {
|
||||
var iframe, hasBound,
|
||||
var iframe, hasBound, resumeTests, suiteAssert,
|
||||
modules = 1,
|
||||
executingComposite = false;
|
||||
|
||||
@ -48,7 +48,9 @@ function runSuite( suite ) {
|
||||
path = suite;
|
||||
}
|
||||
|
||||
QUnit.asyncTest( suite, function() {
|
||||
QUnit.test( suite, function( assert ) {
|
||||
resumeTests = assert.async();
|
||||
suiteAssert = assert;
|
||||
iframe.setAttribute( "src", path );
|
||||
// QUnit.start is called from the child iframe's QUnit.done hook.
|
||||
});
|
||||
@ -90,12 +92,14 @@ function initIframe() {
|
||||
}
|
||||
// Pass all test details through to the main page
|
||||
var message = ( moduleName ? moduleName + ": " : "" ) + testName + ": " + ( data.message || ( data.result ? "okay" : "failed" ) );
|
||||
expect( ++count );
|
||||
QUnit.push( data.result, data.actual, data.expected, message );
|
||||
suiteAssert.expect( ++count );
|
||||
suiteAssert.push( data.result, data.actual, data.expected, message );
|
||||
});
|
||||
|
||||
// Continue the outer test when the iframe's test is done
|
||||
iframeWin.QUnit.done( QUnit.start );
|
||||
iframeWin.QUnit.done(function() {
|
||||
resumeTests();
|
||||
});
|
||||
}
|
||||
|
||||
iframe = document.createElement( "iframe" );
|
||||
@ -107,6 +111,41 @@ function initIframe() {
|
||||
iframeWin = iframe.contentWindow;
|
||||
}
|
||||
|
||||
function appendSuitesToHeader( suites ) {
|
||||
var i, suitesLen, suite, path, name, suitesEl, testResultEl,
|
||||
newSuiteListItemEl, newSuiteLinkEl;
|
||||
|
||||
suitesEl = document.getElementById("qunit-testsuites");
|
||||
|
||||
if (!suitesEl) {
|
||||
testResultEl = document.getElementById("qunit-testresult");
|
||||
|
||||
if (!testResultEl) {
|
||||
// QUnit has not been set up yet. Defer until QUnit is ready.
|
||||
QUnit.begin(function () {
|
||||
appendSuitesToHeader(suites);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
suitesEl = document.createElement("ul");
|
||||
suitesEl.id = "qunit-testsuites";
|
||||
testResultEl.parentNode.insertBefore(suitesEl, testResultEl);
|
||||
}
|
||||
|
||||
for (i = 0, suitesLen = suites.length; i < suitesLen; ++i) {
|
||||
suite = suites[i];
|
||||
newSuiteLinkEl = document.createElement("a");
|
||||
newSuiteLinkEl.innerHTML = suite.name || suite;
|
||||
newSuiteLinkEl.href = suite.path || suite;
|
||||
|
||||
newSuiteListItemEl = document.createElement("li");
|
||||
newSuiteListItemEl.appendChild(newSuiteLinkEl);
|
||||
|
||||
suitesEl.appendChild(newSuiteListItemEl);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} [name] Module name to group these test suites.
|
||||
* @param {Array} suites List of suites where each suite
|
||||
@ -122,6 +161,8 @@ QUnit.testSuites = function( name, suites ) {
|
||||
}
|
||||
suitesLen = suites.length;
|
||||
|
||||
appendSuitesToHeader(suites);
|
||||
|
||||
if ( !hasBound ) {
|
||||
hasBound = true;
|
||||
QUnit.begin( initIframe );
|
||||
@ -138,7 +179,7 @@ QUnit.testSuites = function( name, suites ) {
|
||||
}
|
||||
|
||||
QUnit.module( name, {
|
||||
setup: function () {
|
||||
beforeEach: function () {
|
||||
executingComposite = true;
|
||||
}
|
||||
});
|
||||
@ -154,16 +195,8 @@ QUnit.testDone(function( data ) {
|
||||
}
|
||||
|
||||
var i, len,
|
||||
testId = data.testId || QUnit.config.current.testId || data.testNumber || QUnit.config.current.testNumber,
|
||||
current = testId ?
|
||||
(
|
||||
// QUnit @^1.16.0
|
||||
document.getElementById( "qunit-test-output-" + testId ) ||
|
||||
// QUnit @1.15.x
|
||||
document.getElementById( "qunit-test-output" + testId )
|
||||
) :
|
||||
// QUnit @<1.15.0
|
||||
document.getElementById( QUnit.config.current.id ),
|
||||
testId = data.testId,
|
||||
current = document.getElementById( "qunit-test-output-" + testId ),
|
||||
children = current && current.children,
|
||||
src = iframe.src;
|
||||
|
||||
|
17
external/qunit/LICENSE.txt
vendored
17
external/qunit/LICENSE.txt
vendored
@ -1,13 +1,4 @@
|
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/jquery/qunit
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
Copyright OpenJS Foundation and other contributors, https://openjsf.org/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
@ -27,9 +18,3 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
====
|
||||
|
||||
All files located in the node_modules directory are externally maintained
|
||||
libraries used by this software which have their own licenses; we
|
||||
recommend you read them, as their terms may differ from the terms above.
|
||||
|
350
external/qunit/qunit.css
vendored
350
external/qunit/qunit.css
vendored
@ -1,38 +1,77 @@
|
||||
/*!
|
||||
* QUnit 1.18.0
|
||||
* http://qunitjs.com/
|
||||
* QUnit 2.19.4
|
||||
* https://qunitjs.com/
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Copyright OpenJS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* Date: 2015-04-03T10:23Z
|
||||
* https://jquery.org/license
|
||||
*/
|
||||
|
||||
/** Font Family and Sizes */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult {
|
||||
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
||||
#qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
|
||||
#qunit-tests { font-size: smaller; }
|
||||
|
||||
|
||||
/** Resets */
|
||||
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
||||
#qunit-tests, #qunit-header, #qunit-banner, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Style our buttons in a simple way, uninfluenced by the styles
|
||||
the tested app might load. Don't affect buttons in #qunit-fixture!
|
||||
https://github.com/qunitjs/qunit/pull/1395
|
||||
https://github.com/qunitjs/qunit/issues/1437 */
|
||||
#qunit-testrunner-toolbar button,
|
||||
#qunit-testresult button {
|
||||
all: unset; /* best effort, modern browsers only */
|
||||
font: inherit;
|
||||
color: initial;
|
||||
border: initial;
|
||||
background-color: buttonface;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
/** Header */
|
||||
|
||||
/** Fixed headers with scrollable tests */
|
||||
|
||||
@supports (display: flex) or (display: -webkit-box) {
|
||||
@media (min-height: 500px) {
|
||||
#qunit {
|
||||
position: fixed;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
padding: 8px;
|
||||
display: -webkit-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#qunit-tests {
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
#qunit-banner {
|
||||
flex: 5px 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** Header (excluding toolbar) */
|
||||
|
||||
#qunit-header {
|
||||
padding: 0.5em 0 0.5em 1em;
|
||||
|
||||
color: #8699A4;
|
||||
color: #C2CCD1;
|
||||
background-color: #0D3349;
|
||||
|
||||
font-size: 1.5em;
|
||||
@ -44,7 +83,7 @@
|
||||
|
||||
#qunit-header a {
|
||||
text-decoration: none;
|
||||
color: #C2CCD1;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
#qunit-header a:hover,
|
||||
@ -52,45 +91,205 @@
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar label {
|
||||
display: inline-block;
|
||||
padding: 0 0.5em 0 0.1em;
|
||||
}
|
||||
|
||||
#qunit-banner {
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
#qunit-filteredTest {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #366097;
|
||||
background-color: #F4FF77;
|
||||
}
|
||||
|
||||
#qunit-userAgent {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #FFF;
|
||||
background-color: #2B81AF;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
||||
}
|
||||
|
||||
|
||||
/** Toolbar */
|
||||
|
||||
#qunit-testrunner-toolbar {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
color: #5E740B;
|
||||
background-color: #EEE;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#qunit-userAgent {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
background-color: #2B81AF;
|
||||
color: #FFF;
|
||||
text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
|
||||
#qunit-testrunner-toolbar .clearfix {
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-container {
|
||||
float: right;
|
||||
padding: 0.2em;
|
||||
}
|
||||
|
||||
.qunit-url-config {
|
||||
#qunit-testrunner-toolbar label {
|
||||
display: inline-block;
|
||||
padding: 0.1em;
|
||||
}
|
||||
|
||||
.qunit-filter {
|
||||
display: block;
|
||||
#qunit-testrunner-toolbar input[type=checkbox],
|
||||
#qunit-testrunner-toolbar input[type=radio] {
|
||||
margin: 3px;
|
||||
vertical-align: -2px;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar input[type=text] {
|
||||
box-sizing: border-box;
|
||||
height: 1.6em;
|
||||
}
|
||||
|
||||
#qunit-testrunner-toolbar button,
|
||||
#qunit-testresult button {
|
||||
border-radius: .25em;
|
||||
border: 1px solid #AAA;
|
||||
background-color: #F8F8F8;
|
||||
color: #222;
|
||||
line-height: 1.6;
|
||||
cursor: pointer;
|
||||
}
|
||||
#qunit-testrunner-toolbar button:hover,
|
||||
#qunit-testresult button:hover {
|
||||
border-color: #AAA;
|
||||
background-color: #FFF;
|
||||
color: #444;
|
||||
}
|
||||
#qunit-testrunner-toolbar button:active,
|
||||
#qunit-testresult button:active {
|
||||
border-color: #777;
|
||||
background-color: #CCC;
|
||||
color: #000;
|
||||
}
|
||||
#qunit-testrunner-toolbar button:focus,
|
||||
#qunit-testresult button:focus {
|
||||
border-color: #2F68DA;
|
||||
/* emulate 2px border without a layout shift */
|
||||
box-shadow: inset 0 0 0 1px #2F68DA
|
||||
}
|
||||
#qunit-testrunner-toolbar button:disabled,
|
||||
#qunit-testresult button:disabled {
|
||||
border-color: #CCC;
|
||||
background-color: #CCC;
|
||||
color: #FFF;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
#qunit-toolbar-filters {
|
||||
float: right;
|
||||
/* aligning right avoids overflows and inefficient use of space
|
||||
around the dropdown menu on narrow viewports */
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.qunit-url-config,
|
||||
.qunit-filter,
|
||||
#qunit-modulefilter {
|
||||
display: inline-block;
|
||||
line-height: 2.1em;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.qunit-filter,
|
||||
#qunit-modulefilter {
|
||||
position: relative;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.qunit-url-config label {
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-search {
|
||||
box-sizing: border-box;
|
||||
min-width: 400px;
|
||||
min-width: min(400px, 80vw);
|
||||
}
|
||||
|
||||
#qunit-modulefilter-search-container {
|
||||
position: relative;
|
||||
}
|
||||
#qunit-modulefilter-search-container:after {
|
||||
position: absolute;
|
||||
right: 0.3em;
|
||||
bottom: 0;
|
||||
line-height: 100%;
|
||||
content: "\25bc";
|
||||
color: black;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown {
|
||||
/* align with #qunit-modulefilter-search */
|
||||
box-sizing: border-box;
|
||||
min-width: 400px;
|
||||
min-width: min(400px, 80vw);
|
||||
max-width: 80vw;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 100%;
|
||||
margin-top: 2px;
|
||||
|
||||
/* ensure that when on a narrow viewports and having only one result,
|
||||
that #qunit-modulefilter-actions fall outside the dropdown rectangle. */
|
||||
min-height: 3em;
|
||||
|
||||
border: 1px solid #AAA;
|
||||
border-top-color: transparent;
|
||||
border-radius: 0 0 .25em .25em;
|
||||
color: #0D3349;
|
||||
background-color: #F5F5F5;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-actions {
|
||||
display: block;
|
||||
overflow: auto;
|
||||
/* align with #qunit-modulefilter-dropdown-list */
|
||||
font: smaller/1.5em sans-serif;
|
||||
}
|
||||
@media (min-width: 350px) {
|
||||
#qunit-modulefilter-actions {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > * {
|
||||
box-sizing: border-box;
|
||||
max-height: 2.8em;
|
||||
display: block;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown #qunit-modulefilter-actions > button {
|
||||
float: right;
|
||||
margin: 0.25em;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font: smaller/1.5em sans-serif;
|
||||
}
|
||||
|
||||
#qunit-modulefilter-dropdown-list li {
|
||||
list-style: none;
|
||||
}
|
||||
#qunit-modulefilter-dropdown-list .clickable {
|
||||
display: block;
|
||||
padding: 0.25em 0.50em 0.25em 0.15em;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
#qunit-modulefilter-dropdown-list .clickable.checked {
|
||||
font-weight: bold;
|
||||
background-color: #E2F0F7;
|
||||
color: #0D3349;
|
||||
}
|
||||
#qunit-modulefilter-dropdown .clickable:hover {
|
||||
background-color: #FFF;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
|
||||
/** Tests: Pass/Fail */
|
||||
|
||||
#qunit-tests {
|
||||
@ -110,16 +309,21 @@
|
||||
#qunit-tests li.running,
|
||||
#qunit-tests li.pass,
|
||||
#qunit-tests li.fail,
|
||||
#qunit-tests li.skipped {
|
||||
#qunit-tests li.skipped,
|
||||
#qunit-tests li.aborted {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#qunit-tests.hidepass li.running,
|
||||
#qunit-tests.hidepass li.pass {
|
||||
#qunit-tests.hidepass li.pass:not(.todo) {
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
@ -135,17 +339,12 @@
|
||||
|
||||
#qunit-tests li a {
|
||||
padding: 0.5em;
|
||||
color: #C2CCD1;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests li p a {
|
||||
padding: 0.25em;
|
||||
color: #6B6464;
|
||||
color: inherit;
|
||||
text-decoration: underline;
|
||||
}
|
||||
#qunit-tests li a:hover,
|
||||
#qunit-tests li a:focus {
|
||||
color: #000;
|
||||
color: #0D3349;
|
||||
}
|
||||
|
||||
#qunit-tests li .runtime {
|
||||
@ -162,6 +361,10 @@
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.qunit-source {
|
||||
margin: 0.6em 0 0.3em;
|
||||
}
|
||||
|
||||
.qunit-collapsed {
|
||||
display: none;
|
||||
}
|
||||
@ -188,20 +391,20 @@
|
||||
}
|
||||
|
||||
#qunit-tests del {
|
||||
background-color: #E0F2BE;
|
||||
color: #374E0C;
|
||||
background-color: #E0F2BE;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#qunit-tests ins {
|
||||
background-color: #FFCACA;
|
||||
color: #500;
|
||||
background-color: #FFCACA;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*** Test Counts */
|
||||
|
||||
#qunit-tests b.counts { color: #000; }
|
||||
#qunit-tests b.counts { color: #0D3349; }
|
||||
#qunit-tests b.passed { color: #5E740B; }
|
||||
#qunit-tests b.failed { color: #710909; }
|
||||
|
||||
@ -214,15 +417,22 @@
|
||||
|
||||
/*** Passing Styles */
|
||||
|
||||
|
||||
#qunit-tests .pass {
|
||||
color: #2F68DA;
|
||||
background-color: #E2F0F7;
|
||||
}
|
||||
|
||||
#qunit-tests .pass .test-name {
|
||||
color: #366097;
|
||||
}
|
||||
|
||||
#qunit-tests li li.pass {
|
||||
color: #3C510C;
|
||||
background-color: #FFF;
|
||||
border-left: 10px solid #C6E746;
|
||||
}
|
||||
|
||||
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
|
||||
#qunit-tests .pass .test-name { color: #366097; }
|
||||
|
||||
#qunit-tests .pass .test-actual,
|
||||
#qunit-tests .pass .test-expected { color: #999; }
|
||||
|
||||
@ -230,6 +440,11 @@
|
||||
|
||||
/*** Failing Styles */
|
||||
|
||||
#qunit-tests .fail {
|
||||
color: #000;
|
||||
background-color: #EE5757;
|
||||
}
|
||||
|
||||
#qunit-tests li li.fail {
|
||||
color: #710909;
|
||||
background-color: #FFF;
|
||||
@ -241,21 +456,21 @@
|
||||
border-radius: 0 0 5px 5px;
|
||||
}
|
||||
|
||||
#qunit-tests .fail { color: #000; background-color: #EE5757; }
|
||||
#qunit-tests .fail .test-name,
|
||||
#qunit-tests .fail .module-name { color: #000; }
|
||||
|
||||
#qunit-tests .fail .test-actual { color: #EE5757; }
|
||||
#qunit-tests .fail .test-expected { color: #008000; }
|
||||
|
||||
#qunit-banner.qunit-fail { background-color: #EE5757; }
|
||||
|
||||
|
||||
/*** Aborted tests */
|
||||
#qunit-tests .aborted { color: #000; background-color: orange; }
|
||||
/*** Skipped tests */
|
||||
|
||||
#qunit-tests .skipped {
|
||||
background-color: #EBECE9;
|
||||
}
|
||||
|
||||
#qunit-tests .qunit-todo-label,
|
||||
#qunit-tests .qunit-skipped-label {
|
||||
background-color: #F4FF77;
|
||||
display: inline-block;
|
||||
@ -266,19 +481,38 @@
|
||||
margin: -0.4em 0.4em -0.4em 0;
|
||||
}
|
||||
|
||||
#qunit-tests .qunit-todo-label {
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
/** Result */
|
||||
|
||||
#qunit-testresult {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
|
||||
color: #2B81AF;
|
||||
background-color: #D2E0E6;
|
||||
color: #366097;
|
||||
background-color: #E2F0F7;
|
||||
|
||||
border-bottom: 1px solid #FFF;
|
||||
}
|
||||
#qunit-testresult a {
|
||||
color: #2F68DA;
|
||||
}
|
||||
#qunit-testresult .clearfix {
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
#qunit-testresult .module-name {
|
||||
font-weight: 700;
|
||||
}
|
||||
#qunit-testresult-display {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
width: 85%;
|
||||
float:left;
|
||||
}
|
||||
#qunit-testresult-controls {
|
||||
padding: 0.5em 1em 0.5em 1em;
|
||||
width: 10%;
|
||||
float:left;
|
||||
}
|
||||
|
||||
/** Fixture */
|
||||
|
||||
|
10419
external/qunit/qunit.js
vendored
10419
external/qunit/qunit.js
vendored
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@ -53,20 +53,20 @@
|
||||
"devDependencies": {
|
||||
"commitplease": "3.2.0",
|
||||
"eslint-config-jquery": "3.0.0",
|
||||
"grunt": "1.5.3",
|
||||
"grunt": "1.6.1",
|
||||
"grunt-bowercopy": "1.2.5",
|
||||
"grunt-cli": "1.4.3",
|
||||
"grunt-compare-size": "0.4.2",
|
||||
"grunt-contrib-concat": "1.0.1",
|
||||
"grunt-contrib-concat": "2.1.0",
|
||||
"grunt-contrib-csslint": "2.0.0",
|
||||
"grunt-contrib-qunit": "5.1.1",
|
||||
"grunt-contrib-qunit": "7.0.0",
|
||||
"grunt-contrib-requirejs": "1.0.0",
|
||||
"grunt-contrib-uglify": "5.0.1",
|
||||
"grunt-eslint": "23.0.0",
|
||||
"grunt-contrib-uglify": "5.2.2",
|
||||
"grunt-eslint": "24.0.1",
|
||||
"grunt-git-authors": "3.2.0",
|
||||
"grunt-html": "14.5.0",
|
||||
"grunt-html": "16.0.0",
|
||||
"load-grunt-tasks": "5.1.0",
|
||||
"rimraf": "3.0.2",
|
||||
"rimraf": "4.4.1",
|
||||
"testswarm": "1.1.2"
|
||||
},
|
||||
"keywords": []
|
||||
|
Loading…
Reference in New Issue
Block a user