Bump qunit from 2.6.0 to 2.6.2
authorJames D. Forrester <jforrester@wikimedia.org>
Wed, 5 Sep 2018 22:51:03 +0000 (15:51 -0700)
committerJames D. Forrester <jforrester@wikimedia.org>
Mon, 10 Sep 2018 20:37:48 +0000 (13:37 -0700)
Change-Id: Id7f47eee423c2fc1289f468c6622b952814d8912

RELEASE-NOTES-1.32
maintenance/resources/foreign-resources.yaml
package.json
resources/lib/qunitjs/qunit.css
resources/lib/qunitjs/qunit.js

index 0dca8f1..be91861 100644 (file)
@@ -97,7 +97,7 @@ production.
 * …
 
 ==== Changed external libraries ====
 * …
 
 ==== Changed external libraries ====
-* Updated qunitjs from 2.4.0 to 2.6.0.
+* Updated qunitjs from 2.4.0 to 2.6.2.
 * Updated wikimedia/scoped-callback from 1.0.0 to 2.0.0.
 ** ScopedCallback objects can no longer be serialized.
 * Updated wikimedia/wrappedstring from 2.3.0 to 3.0.1.
 * Updated wikimedia/scoped-callback from 1.0.0 to 2.0.0.
 ** ScopedCallback objects can no longer be serialized.
 * Updated wikimedia/wrappedstring from 2.3.0 to 3.0.1.
index 25086d4..930696d 100644 (file)
@@ -82,11 +82,11 @@ qunitjs:
   # Integrity from link modals at https://code.jquery.com/qunit/
   files:
     qunit.js:
   # Integrity from link modals at https://code.jquery.com/qunit/
   files:
     qunit.js:
-      src: https://code.jquery.com/qunit/qunit-2.6.0.js
-      integrity: sha256-QdI40P4EEDzPRIS0mktlE0sSyoXCnOs8fB4OSmy+VxI=
+      src: https://code.jquery.com/qunit/qunit-2.6.2.js
+      integrity: sha256-72OhbBvECs6Z5vG0GfPqiyYvTf8vhdEVHKQcacIcIeM=
     qunit.css:
     qunit.css:
-      src: https://code.jquery.com/qunit/qunit-2.6.0.css
-      integrity: sha256-F4O5nugrHEEjfO0tfu/LKnSRFKctZ9Rdmi1oj22UD1s=
+      src: https://code.jquery.com/qunit/qunit-2.6.2.css
+      integrity: sha256-qpkurjTvVTJJCSpMABcvF4IlYUJkd8saxiHgUQpEjX8=
 CLDRPluralRuleParser:
   type: file
   src: https://raw.githubusercontent.com/santhoshtr/CLDRPluralRuleParser/v1.1.3/src/CLDRPluralRuleParser.js
 CLDRPluralRuleParser:
   type: file
   src: https://raw.githubusercontent.com/santhoshtr/CLDRPluralRuleParser/v1.1.3/src/CLDRPluralRuleParser.js
index 5fa6961..4f7523e 100644 (file)
@@ -28,7 +28,7 @@
     "karma-mocha-reporter": "2.2.5",
     "karma-qunit": "2.1.0",
     "postcss-less": "2.0.0",
     "karma-mocha-reporter": "2.2.5",
     "karma-qunit": "2.1.0",
     "postcss-less": "2.0.0",
-    "qunit": "2.6.0",
+    "qunit": "2.6.2",
     "stylelint": "9.2.0",
     "stylelint-config-wikimedia": "0.4.3",
     "wdio-junit-reporter": "0.2.0",
     "stylelint": "9.2.0",
     "stylelint-config-wikimedia": "0.4.3",
     "wdio-junit-reporter": "0.2.0",
index 859544e..a7002a0 100644 (file)
@@ -1,12 +1,12 @@
 /*!
 /*!
- * QUnit 2.6.0
+ * QUnit 2.6.2
  * https://qunitjs.com/
  *
  * Copyright jQuery Foundation and other contributors
  * Released under the MIT license
  * https://jquery.org/license
  *
  * https://qunitjs.com/
  *
  * Copyright jQuery Foundation and other contributors
  * Released under the MIT license
  * https://jquery.org/license
  *
- * Date: 2018-03-27T02:18Z
+ * Date: 2018-08-19T19:37Z
  */
 
 /** Font Family and Sizes */
  */
 
 /** Font Family and Sizes */
index d7b22dd..aea68ba 100644 (file)
@@ -1,12 +1,12 @@
 /*!
 /*!
- * QUnit 2.6.0
+ * QUnit 2.6.2
  * https://qunitjs.com/
  *
  * Copyright jQuery Foundation and other contributors
  * Released under the MIT license
  * https://jquery.org/license
  *
  * https://qunitjs.com/
  *
  * Copyright jQuery Foundation and other contributors
  * Released under the MIT license
  * https://jquery.org/license
  *
- * Date: 2018-03-27T02:18Z
+ * Date: 2018-08-19T19:37Z
  */
 (function (global$1) {
   'use strict';
  */
 (function (global$1) {
   'use strict';
        return dump;
   })();
 
        return dump;
   })();
 
+  var SuiteReport = function () {
+       function SuiteReport(name, parentSuite) {
+               classCallCheck(this, SuiteReport);
+
+               this.name = name;
+               this.fullName = parentSuite ? parentSuite.fullName.concat(name) : [];
+
+               this.tests = [];
+               this.childSuites = [];
+
+               if (parentSuite) {
+                       parentSuite.pushChildSuite(this);
+               }
+       }
+
+       createClass(SuiteReport, [{
+               key: "start",
+               value: function start(recordTime) {
+                       if (recordTime) {
+                               this._startTime = Date.now();
+                       }
+
+                       return {
+                               name: this.name,
+                               fullName: this.fullName.slice(),
+                               tests: this.tests.map(function (test) {
+                                       return test.start();
+                               }),
+                               childSuites: this.childSuites.map(function (suite) {
+                                       return suite.start();
+                               }),
+                               testCounts: {
+                                       total: this.getTestCounts().total
+                               }
+                       };
+               }
+       }, {
+               key: "end",
+               value: function end(recordTime) {
+                       if (recordTime) {
+                               this._endTime = Date.now();
+                       }
+
+                       return {
+                               name: this.name,
+                               fullName: this.fullName.slice(),
+                               tests: this.tests.map(function (test) {
+                                       return test.end();
+                               }),
+                               childSuites: this.childSuites.map(function (suite) {
+                                       return suite.end();
+                               }),
+                               testCounts: this.getTestCounts(),
+                               runtime: this.getRuntime(),
+                               status: this.getStatus()
+                       };
+               }
+       }, {
+               key: "pushChildSuite",
+               value: function pushChildSuite(suite) {
+                       this.childSuites.push(suite);
+               }
+       }, {
+               key: "pushTest",
+               value: function pushTest(test) {
+                       this.tests.push(test);
+               }
+       }, {
+               key: "getRuntime",
+               value: function getRuntime() {
+                       return this._endTime - this._startTime;
+               }
+       }, {
+               key: "getTestCounts",
+               value: function getTestCounts() {
+                       var counts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { passed: 0, failed: 0, skipped: 0, todo: 0, total: 0 };
+
+                       counts = this.tests.reduce(function (counts, test) {
+                               if (test.valid) {
+                                       counts[test.getStatus()]++;
+                                       counts.total++;
+                               }
+
+                               return counts;
+                       }, counts);
+
+                       return this.childSuites.reduce(function (counts, suite) {
+                               return suite.getTestCounts(counts);
+                       }, counts);
+               }
+       }, {
+               key: "getStatus",
+               value: function getStatus() {
+                       var _getTestCounts = this.getTestCounts(),
+                           total = _getTestCounts.total,
+                           failed = _getTestCounts.failed,
+                           skipped = _getTestCounts.skipped,
+                           todo = _getTestCounts.todo;
+
+                       if (failed) {
+                               return "failed";
+                       } else {
+                               if (skipped === total) {
+                                       return "skipped";
+                               } else if (todo === total) {
+                                       return "todo";
+                               } else {
+                                       return "passed";
+                               }
+                       }
+               }
+       }]);
+       return SuiteReport;
+  }();
+
+  var focused = false;
+
+  var moduleStack = [];
+
+  function createModule(name, testEnvironment, modifiers) {
+       var parentModule = moduleStack.length ? moduleStack.slice(-1)[0] : null;
+       var moduleName = parentModule !== null ? [parentModule.name, name].join(" > ") : name;
+       var parentSuite = parentModule ? parentModule.suiteReport : globalSuite;
+
+       var skip = parentModule !== null && parentModule.skip || modifiers.skip;
+       var todo = parentModule !== null && parentModule.todo || modifiers.todo;
+
+       var module = {
+               name: moduleName,
+               parentModule: parentModule,
+               tests: [],
+               moduleId: generateHash(moduleName),
+               testsRun: 0,
+               unskippedTestsRun: 0,
+               childModules: [],
+               suiteReport: new SuiteReport(name, parentSuite),
+
+               // Pass along `skip` and `todo` properties from parent module, in case
+               // there is one, to childs. And use own otherwise.
+               // This property will be used to mark own tests and tests of child suites
+               // as either `skipped` or `todo`.
+               skip: skip,
+               todo: skip ? false : todo
+       };
+
+       var env = {};
+       if (parentModule) {
+               parentModule.childModules.push(module);
+               extend(env, parentModule.testEnvironment);
+       }
+       extend(env, testEnvironment);
+       module.testEnvironment = env;
+
+       config.modules.push(module);
+       return module;
+  }
+
+  function processModule(name, options, executeNow) {
+       var modifiers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
+
+       if (objectType(options) === "function") {
+               executeNow = options;
+               options = undefined;
+       }
+
+       var module = createModule(name, options, modifiers);
+
+       // Move any hooks to a 'hooks' object
+       var testEnvironment = module.testEnvironment;
+       var hooks = module.hooks = {};
+
+       setHookFromEnvironment(hooks, testEnvironment, "before");
+       setHookFromEnvironment(hooks, testEnvironment, "beforeEach");
+       setHookFromEnvironment(hooks, testEnvironment, "afterEach");
+       setHookFromEnvironment(hooks, testEnvironment, "after");
+
+       var moduleFns = {
+               before: setHookFunction(module, "before"),
+               beforeEach: setHookFunction(module, "beforeEach"),
+               afterEach: setHookFunction(module, "afterEach"),
+               after: setHookFunction(module, "after")
+       };
+
+       var currentModule = config.currentModule;
+       if (objectType(executeNow) === "function") {
+               moduleStack.push(module);
+               config.currentModule = module;
+               executeNow.call(module.testEnvironment, moduleFns);
+               moduleStack.pop();
+               module = module.parentModule || currentModule;
+       }
+
+       config.currentModule = module;
+
+       function setHookFromEnvironment(hooks, environment, name) {
+               var potentialHook = environment[name];
+               hooks[name] = typeof potentialHook === "function" ? [potentialHook] : [];
+               delete environment[name];
+       }
+
+       function setHookFunction(module, hookName) {
+               return function setHook(callback) {
+                       module.hooks[hookName].push(callback);
+               };
+       }
+  }
+
+  function module$1(name, options, executeNow) {
+       if (focused) {
+               return;
+       }
+
+       processModule(name, options, executeNow);
+  }
+
+  module$1.only = function () {
+       if (focused) {
+               return;
+       }
+
+       config.modules.length = 0;
+       config.queue.length = 0;
+
+       module$1.apply(undefined, arguments);
+
+       focused = true;
+  };
+
+  module$1.skip = function (name, options, executeNow) {
+       if (focused) {
+               return;
+       }
+
+       processModule(name, options, executeNow, { skip: true });
+  };
+
+  module$1.todo = function (name, options, executeNow) {
+       if (focused) {
+               return;
+       }
+
+       processModule(name, options, executeNow, { todo: true });
+  };
+
   var LISTENERS = Object.create(null);
   var SUPPORTED_EVENTS = ["runStart", "suiteStart", "testStart", "assertion", "testEnd", "suiteEnd", "runEnd"];
 
   var LISTENERS = Object.create(null);
   var SUPPORTED_EVENTS = ["runStart", "suiteStart", "testStart", "assertion", "testEnd", "suiteEnd", "runEnd"];
 
        finish: function finish() {
                config.current = this;
 
        finish: function finish() {
                config.current = this;
 
+               // Release the test callback to ensure that anything referenced has been
+               // released to be garbage collected.
+               this.callback = undefined;
+
                if (this.steps.length) {
                        var stepsList = this.steps.join(", ");
                        this.pushFailure("Expected assert.verifySteps() to be called before end of test " + ("after using assert.step(). Unverified steps: " + stepsList), this.stack);
                if (this.steps.length) {
                        var stepsList = this.steps.join(", ");
                        this.pushFailure("Expected assert.verifySteps() to be called before end of test " + ("after using assert.step(). Unverified steps: " + stepsList), this.stack);
                config.current = undefined;
 
                function logSuiteEnd(module) {
                config.current = undefined;
 
                function logSuiteEnd(module) {
+
+                       // Reset `module.hooks` to ensure that anything referenced in these hooks
+                       // has been released to be garbage collected.
+                       module.hooks = {};
+
                        emit("suiteEnd", module.suiteReport.end(true));
                        runLoggingCallbacks("moduleDone", {
                                name: module.name,
                        emit("suiteEnd", module.suiteReport.end(true));
                        runLoggingCallbacks("moduleDone", {
                                name: module.name,
                                result = false;
                        }
 
                                result = false;
                        }
 
-                       return this.pushResult({
+                       this.pushResult({
                                result: result,
                                message: assertionMessage
                        });
                                result: result,
                                message: assertionMessage
                        });
        }
   }
 
        }
   }
 
-  var SuiteReport = function () {
-       function SuiteReport(name, parentSuite) {
-               classCallCheck(this, SuiteReport);
-
-               this.name = name;
-               this.fullName = parentSuite ? parentSuite.fullName.concat(name) : [];
-
-               this.tests = [];
-               this.childSuites = [];
-
-               if (parentSuite) {
-                       parentSuite.pushChildSuite(this);
-               }
-       }
-
-       createClass(SuiteReport, [{
-               key: "start",
-               value: function start(recordTime) {
-                       if (recordTime) {
-                               this._startTime = Date.now();
-                       }
-
-                       return {
-                               name: this.name,
-                               fullName: this.fullName.slice(),
-                               tests: this.tests.map(function (test) {
-                                       return test.start();
-                               }),
-                               childSuites: this.childSuites.map(function (suite) {
-                                       return suite.start();
-                               }),
-                               testCounts: {
-                                       total: this.getTestCounts().total
-                               }
-                       };
-               }
-       }, {
-               key: "end",
-               value: function end(recordTime) {
-                       if (recordTime) {
-                               this._endTime = Date.now();
-                       }
-
-                       return {
-                               name: this.name,
-                               fullName: this.fullName.slice(),
-                               tests: this.tests.map(function (test) {
-                                       return test.end();
-                               }),
-                               childSuites: this.childSuites.map(function (suite) {
-                                       return suite.end();
-                               }),
-                               testCounts: this.getTestCounts(),
-                               runtime: this.getRuntime(),
-                               status: this.getStatus()
-                       };
-               }
-       }, {
-               key: "pushChildSuite",
-               value: function pushChildSuite(suite) {
-                       this.childSuites.push(suite);
-               }
-       }, {
-               key: "pushTest",
-               value: function pushTest(test) {
-                       this.tests.push(test);
-               }
-       }, {
-               key: "getRuntime",
-               value: function getRuntime() {
-                       return this._endTime - this._startTime;
-               }
-       }, {
-               key: "getTestCounts",
-               value: function getTestCounts() {
-                       var counts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { passed: 0, failed: 0, skipped: 0, todo: 0, total: 0 };
-
-                       counts = this.tests.reduce(function (counts, test) {
-                               if (test.valid) {
-                                       counts[test.getStatus()]++;
-                                       counts.total++;
-                               }
-
-                               return counts;
-                       }, counts);
-
-                       return this.childSuites.reduce(function (counts, suite) {
-                               return suite.getTestCounts(counts);
-                       }, counts);
-               }
-       }, {
-               key: "getStatus",
-               value: function getStatus() {
-                       var _getTestCounts = this.getTestCounts(),
-                           total = _getTestCounts.total,
-                           failed = _getTestCounts.failed,
-                           skipped = _getTestCounts.skipped,
-                           todo = _getTestCounts.todo;
-
-                       if (failed) {
-                               return "failed";
-                       } else {
-                               if (skipped === total) {
-                                       return "skipped";
-                               } else if (todo === total) {
-                                       return "todo";
-                               } else {
-                                       return "passed";
-                               }
-                       }
-               }
-       }]);
-       return SuiteReport;
-  }();
-
   // Handle an unhandled exception. By convention, returns true if further
   // error handling should be suppressed and false otherwise.
   // In this case, we will only suppress further error handling if the
   // Handle an unhandled exception. By convention, returns true if further
   // error handling should be suppressed and false otherwise.
   // In this case, we will only suppress further error handling if the
        }
   }
 
        }
   }
 
-  var focused = false;
   var QUnit = {};
   var globalSuite = new SuiteReport();
 
   var QUnit = {};
   var globalSuite = new SuiteReport();
 
   // it since each module has a suiteReport associated with it.
   config.currentModule.suiteReport = globalSuite;
 
   // it since each module has a suiteReport associated with it.
   config.currentModule.suiteReport = globalSuite;
 
-  var moduleStack = [];
   var globalStartCalled = false;
   var runStarted = false;
 
   var globalStartCalled = false;
   var runStarted = false;
 
   QUnit.isLocal = !(defined.document && window.location.protocol !== "file:");
 
   // Expose the current QUnit version
   QUnit.isLocal = !(defined.document && window.location.protocol !== "file:");
 
   // Expose the current QUnit version
-  QUnit.version = "2.6.0";
-
-  function createModule(name, testEnvironment, modifiers) {
-       var parentModule = moduleStack.length ? moduleStack.slice(-1)[0] : null;
-       var moduleName = parentModule !== null ? [parentModule.name, name].join(" > ") : name;
-       var parentSuite = parentModule ? parentModule.suiteReport : globalSuite;
-
-       var skip$$1 = parentModule !== null && parentModule.skip || modifiers.skip;
-       var todo$$1 = parentModule !== null && parentModule.todo || modifiers.todo;
-
-       var module = {
-               name: moduleName,
-               parentModule: parentModule,
-               tests: [],
-               moduleId: generateHash(moduleName),
-               testsRun: 0,
-               unskippedTestsRun: 0,
-               childModules: [],
-               suiteReport: new SuiteReport(name, parentSuite),
-
-               // Pass along `skip` and `todo` properties from parent module, in case
-               // there is one, to childs. And use own otherwise.
-               // This property will be used to mark own tests and tests of child suites
-               // as either `skipped` or `todo`.
-               skip: skip$$1,
-               todo: skip$$1 ? false : todo$$1
-       };
-
-       var env = {};
-       if (parentModule) {
-               parentModule.childModules.push(module);
-               extend(env, parentModule.testEnvironment);
-       }
-       extend(env, testEnvironment);
-       module.testEnvironment = env;
-
-       config.modules.push(module);
-       return module;
-  }
-
-  function processModule(name, options, executeNow) {
-       var modifiers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
-
-       var module = createModule(name, options, modifiers);
-
-       // Move any hooks to a 'hooks' object
-       var testEnvironment = module.testEnvironment;
-       var hooks = module.hooks = {};
-
-       setHookFromEnvironment(hooks, testEnvironment, "before");
-       setHookFromEnvironment(hooks, testEnvironment, "beforeEach");
-       setHookFromEnvironment(hooks, testEnvironment, "afterEach");
-       setHookFromEnvironment(hooks, testEnvironment, "after");
-
-       function setHookFromEnvironment(hooks, environment, name) {
-               var potentialHook = environment[name];
-               hooks[name] = typeof potentialHook === "function" ? [potentialHook] : [];
-               delete environment[name];
-       }
-
-       var moduleFns = {
-               before: setHookFunction(module, "before"),
-               beforeEach: setHookFunction(module, "beforeEach"),
-               afterEach: setHookFunction(module, "afterEach"),
-               after: setHookFunction(module, "after")
-       };
-
-       var currentModule = config.currentModule;
-       if (objectType(executeNow) === "function") {
-               moduleStack.push(module);
-               config.currentModule = module;
-               executeNow.call(module.testEnvironment, moduleFns);
-               moduleStack.pop();
-               module = module.parentModule || currentModule;
-       }
-
-       config.currentModule = module;
-  }
-
-  // TODO: extract this to a new file alongside its related functions
-  function module$1(name, options, executeNow) {
-       if (focused) {
-               return;
-       }
-
-       if (arguments.length === 2) {
-               if (objectType(options) === "function") {
-                       executeNow = options;
-                       options = undefined;
-               }
-       }
-
-       processModule(name, options, executeNow);
-  }
-
-  module$1.only = function () {
-       if (focused) {
-               return;
-       }
-
-       config.modules.length = 0;
-       config.queue.length = 0;
-
-       module$1.apply(undefined, arguments);
-
-       focused = true;
-  };
-
-  module$1.skip = function (name, options, executeNow) {
-       if (focused) {
-               return;
-       }
-
-       if (arguments.length === 2) {
-               if (objectType(options) === "function") {
-                       executeNow = options;
-                       options = undefined;
-               }
-       }
-
-       processModule(name, options, executeNow, { skip: true });
-  };
-
-  module$1.todo = function (name, options, executeNow) {
-       if (focused) {
-               return;
-       }
-
-       if (arguments.length === 2) {
-               if (objectType(options) === "function") {
-                       executeNow = options;
-                       options = undefined;
-               }
-       }
-
-       processModule(name, options, executeNow, { todo: true });
-  };
+  QUnit.version = "2.6.2";
 
   extend(QUnit, {
        on: on,
 
   extend(QUnit, {
        on: on,
        ProcessingQueue.advance();
   }
 
        ProcessingQueue.advance();
   }
 
-  function setHookFunction(module, hookName) {
-       return function setHook(callback) {
-               module.hooks[hookName].push(callback);
-       };
-  }
-
   exportQUnit(QUnit);
 
   (function () {
   exportQUnit(QUnit);
 
   (function () {
                    dirty = false;
 
                moduleSearch.id = "qunit-modulefilter-search";
                    dirty = false;
 
                moduleSearch.id = "qunit-modulefilter-search";
+               moduleSearch.autocomplete = "off";
                addEvent(moduleSearch, "input", searchInput);
                addEvent(moduleSearch, "input", searchFocus);
                addEvent(moduleSearch, "focus", searchFocus);
                addEvent(moduleSearch, "input", searchInput);
                addEvent(moduleSearch, "input", searchFocus);
                addEvent(moduleSearch, "focus", searchFocus);
        function stripHtml(string) {
 
                // Strip tags, html entity and whitespaces
        function stripHtml(string) {
 
                // Strip tags, html entity and whitespaces
-               return string.replace(/<\/?[^>]+(>|$)/g, "").replace(/\&quot;/g, "").replace(/\s+/g, "");
+               return string.replace(/<\/?[^>]+(>|$)/g, "").replace(/&quot;/g, "").replace(/\s+/g, "");
        }
 
        QUnit.log(function (details) {
        }
 
        QUnit.log(function (details) {