Home page Forum Wiki Mail Jabber Devel NIX-FILES

AltLUG Git

Git-repositories of Altai Linux User Group

Merge remote branch 'mmchaney/master'
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 10 Oct 2011 12:12:47 +0000 (14:12 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 10 Oct 2011 12:12:47 +0000 (14:12 +0200)
1  2 
qunit/qunit.js

diff --combined qunit/qunit.js
@@@ -1,5 -1,5 +1,5 @@@
  /**
 - * QUnit - A JavaScript Unit Testing Framework
 + * QUnit 1.1.0pre - A JavaScript Unit Testing Framework
   *
   * http://docs.jquery.com/QUnit
   *
@@@ -21,9 -21,7 +21,9 @@@ var defined = 
        })()
  };
  
 -var testId = 0;
 +var   testId = 0,
 +      toString = Object.prototype.toString,
 +      hasOwn = Object.prototype.hasOwnProperty;
  
  var Test = function(name, testName, expected, testEnvironmentArg, async, callback) {
        this.name = name;
@@@ -124,7 -122,7 +124,7 @@@ Test.prototype = 
                }
        },
        finish: function() {
-               if ( this.expected && this.expected != this.assertions.length ) {
+               if ( this.expected != null && this.expected != this.assertions.length ) {
                        QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" );
                }
  
@@@ -609,7 -607,8 +609,7 @@@ extend(QUnit, 
                                return "null";
                }
  
 -              var type = Object.prototype.toString.call( obj )
 -                      .match(/^\[object\s(.*)\]$/)[1] || '';
 +              var type = toString.call( obj ).match(/^\[object\s(.*)\]$/)[1] || '';
  
                switch (type) {
                                case 'Number':
                var querystring = "?",
                        key;
                for ( key in params ) {
 +                      if ( !hasOwn.call( params, key ) ) {
 +                              continue;
 +                      }
                        querystring += encodeURIComponent( key ) + "=" +
                                encodeURIComponent( params[ key ] ) + "&";
                }
@@@ -929,9 -925,6 +929,9 @@@ function saveGlobal() 
  
        if ( config.noglobals ) {
                for ( var key in window ) {
 +                      if ( !hasOwn.call( window, key ) ) {
 +                              continue;
 +                      }
                        config.pollution.push( key );
                }
        }
@@@ -1457,9 -1450,6 +1457,9 @@@ QUnit.diff = (function() 
                }
  
                for (var i in ns) {
 +                      if ( !hasOwn.call( ns, i ) ) {
 +                              continue;
 +                      }
                        if (ns[i].rows.length == 1 && typeof(os[i]) != "undefined" && os[i].rows.length == 1) {
                                n[ns[i].rows[0]] = {
                                        text: n[ns[i].rows[0]],

Hosting is provided AltSPAHow to use Git
Please direct any questions on jabber alex.wolf@jabber.ru

Valid HTML 4.0 Transitional Valid CSS!

Designer Alexander Wolf