diff options
| author | Igor Minar | 2011-09-15 04:54:00 +0200 |
|---|---|---|
| committer | Igor Minar | 2011-09-16 02:44:33 +0200 |
| commit | 2170c06924b3a0dc1fef3b383d6a236e670dceea (patch) | |
| tree | d90ce95ee59777d81c95cd8ed95a0c754eda710a /test/testabilityPatch.js | |
| parent | 0e5a24c584d88b17297010676b8e0005b3545efd (diff) | |
| download | angular.js-2170c06924b3a0dc1fef3b383d6a236e670dceea.tar.bz2 | |
fix(specs): fix jQuery to jqLite binding on IE8
It appears that this whole time all IE8 unit tests ran only with jqLite. Due to a weird bug in IE[1], we never overwrote jqLite implementation with jQuery, so the tests ran with our jqLite instead.
This affected only IE8 (and likely older) and only in unit testing mode. angular.js - the built artifact binds to jQuery just find.
[1] https://plus.google.com/104744871076396904202/posts/Kqjuj6RSbbT
Diffstat (limited to 'test/testabilityPatch.js')
| -rw-r--r-- | test/testabilityPatch.js | 8 |
1 files changed, 8 insertions, 0 deletions
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(''); |
