diff options
Diffstat (limited to 'test/jqLiteSpec.js')
| -rw-r--r-- | test/jqLiteSpec.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js index abfad064..913e6192 100644 --- a/test/jqLiteSpec.js +++ b/test/jqLiteSpec.js @@ -126,6 +126,20 @@ describe('jqLite', function() { dealoc(doc); } ); + + it('should return null values', function () { + var ul = jqLite('<ul><li><p><b>deep deep</b><p></li></ul>'), + li = ul.find('li'), + b = li.find('b'); + + ul.data('foo', 'bar'); + li.data('foo', null); + expect(b.inheritedData('foo')).toBe(null); + expect(li.inheritedData('foo')).toBe(null); + expect(ul.inheritedData('foo')).toBe('bar'); + + dealoc(ul); + }); }); |
