]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Disable deprecated global QUnit method aliases to prevent backsliding on QUnit v2... 15970/head
authorChris Rebert <code@rebertia.com>
Mon, 2 Mar 2015 03:48:06 +0000 (19:48 -0800)
committerChris Rebert <code@rebertia.com>
Mon, 2 Mar 2015 03:50:11 +0000 (19:50 -0800)
js/tests/index.html

index 6f94e415d6d825e908bd008e613ca26a686d9190..66ab2635afcf8519a7bb77cc125c7afcbdd67754 100644 (file)
           $('#qunit-fixture').css({ top: '', left: '' })
         })
       }
+
+      // Disable deprecated global QUnit method aliases in preparation for QUnit v2
+      (function () {
+        var methodNames = [
+          'async',
+          'asyncTest',
+          'deepEqual',
+          'equal',
+          'expect',
+          'module',
+          'notDeepEqual',
+          'notEqual',
+          'notPropEqual',
+          'notStrictEqual',
+          'ok',
+          'propEqual',
+          'push',
+          'start',
+          'stop',
+          'strictEqual',
+          'test',
+          'throws'
+        ];
+        for (var i = 0; i < methodNames.length; i++) {
+          var methodName = methodNames[i];
+          window[methodName] = undefined;
+        }
+      })();
     </script>
 
     <!-- Plugin sources -->