From 10da625ed93511dbf5d4e61ca4e42f6f2d478959 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Fri, 8 Jul 2011 12:18:26 +0200 Subject: fix:jqLite: Normalize non-existing attributes to undefined as jQuery jqLite was returning null, but jQuery returns undefined --- test/jqLiteSpec.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') 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('
a
'); + expect(elm.attr('non-existing')).toBeUndefined(); + }); }); -- cgit v1.2.3