diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/jqLiteSpec.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js index 5aec0cff..6794c4e0 100644 --- a/test/jqLiteSpec.js +++ b/test/jqLiteSpec.js @@ -380,6 +380,24 @@ describe('jqLite', function(){ }); }); + describe('prepend', function(){ + it('should prepend to empty', function(){ + var root = jqLite('<div>'); + expect(root.prepend('<span>abc</span>')).toEqual(root); + expect(root.html().toLowerCase()).toEqual('<span>abc</span>'); + }); + it('should prepend to content', function(){ + var root = jqLite('<div>text</div>'); + expect(root.prepend('<span>abc</span>')).toEqual(root); + expect(root.html().toLowerCase()).toEqual('<span>abc</span>text'); + }); + it('should prepend text to content', function(){ + var root = jqLite('<div>text</div>'); + expect(root.prepend('abc')).toEqual(root); + expect(root.html().toLowerCase()).toEqual('abctext'); + }); + }); + describe('remove', function(){ it('should remove', function(){ |
