diff options
| -rw-r--r-- | test/jqLiteSpec.js | 5 | ||||
| -rw-r--r-- | test/jquery_alias.js | 3 | ||||
| -rw-r--r-- | test/jquery_remove.js | 3 | ||||
| -rw-r--r-- | test/testabilityPatch.js | 8 | 
4 files changed, 17 insertions, 2 deletions
diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js index b31b1664..63ba24bf 100644 --- a/test/jqLiteSpec.js +++ b/test/jqLiteSpec.js @@ -39,6 +39,11 @@ describe('jqLite', function(){    }); +  it('should be jqLite when jqLiteMode is on, otherwise jQuery', function() { +    expect(jqLite).toBe(_jqLiteMode ? jqLiteWrap : _jQuery); +  }); + +    describe('construction', function(){      it('should allow construction with text node', function(){        var text = a.firstChild; diff --git a/test/jquery_alias.js b/test/jquery_alias.js index d9e1222b..ee4094f2 100644 --- a/test/jquery_alias.js +++ b/test/jquery_alias.js @@ -1,3 +1,4 @@  'use strict'; -var _jQuery = jQuery; +var _jQuery = jQuery, +    _jqLiteMode = false; diff --git a/test/jquery_remove.js b/test/jquery_remove.js index 0f2ce623..66029c81 100644 --- a/test/jquery_remove.js +++ b/test/jquery_remove.js @@ -1,3 +1,4 @@  'use strict'; -var _jQuery = jQuery.noConflict(true); +var _jQuery = jQuery.noConflict(true), +    _jqLiteMode = true; diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js index 314ba6da..24f10139 100644 --- a/test/testabilityPatch.js +++ b/test/testabilityPatch.js @@ -28,6 +28,14 @@ if (window.jstestdriver) {  beforeEach(function(){    // This is to reset parsers global cache of expressions.    compileCache = {}; + +  // workaround for IE bug https://plus.google.com/104744871076396904202/posts/Kqjuj6RSbbT +  // IE overwrite window.jQuery with undefined because of empty jQuery var statement, so we have to +  // correct this, but only if we are not running in jqLite mode +  if (!_jqLiteMode && _jQuery !== jQuery) { +    jQuery = _jQuery; +  } +    // reset to jQuery or default to us.    bindJQuery();    jqLite(document.body).html('');  | 
