fix:jqLite: Normalize non-existing attributes to undefined as jQuery

jqLite was returning null, but jQuery returns undefined
This commit is contained in:
Vojta Jina
2011-07-08 12:18:26 +02:00
committed by Igor Minar
parent 9ee9ca13da
commit 10da625ed9
2 changed files with 7 additions and 1 deletions

View File

@@ -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();
});
});