diff options
| author | Vojta Jina | 2011-07-08 12:18:26 +0200 | 
|---|---|---|
| committer | Igor Minar | 2011-07-12 23:04:46 -0700 | 
| commit | 10da625ed93511dbf5d4e61ca4e42f6f2d478959 (patch) | |
| tree | 754722015f0f677aa36c90dba2dd396430187b2c /test/jqLiteSpec.js | |
| parent | 9ee9ca13da3883d06733637f9048a83d94e6f1f8 (diff) | |
| download | angular.js-10da625ed93511dbf5d4e61ca4e42f6f2d478959.tar.bz2 | |
fix:jqLite: Normalize non-existing attributes to undefined as jQuery
jqLite was returning null, but jQuery returns undefined
Diffstat (limited to 'test/jqLiteSpec.js')
| -rw-r--r-- | test/jqLiteSpec.js | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js index fafe7f2a..2c05a7e5 100644 --- a/test/jqLiteSpec.js +++ b/test/jqLiteSpec.js @@ -162,6 +162,10 @@ describe('jqLite', function(){        expect(select.attr('multiple')).toEqual(true);      }); +    it('should return undefined for non-existing attributes', function() { +      var elm = jqLite('<div class="any">a</div>'); +      expect(elm.attr('non-existing')).toBeUndefined(); +    });    });  | 
