From 89e001b18a4f6d18caea1e9a3d015639feb4f1ee Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Wed, 8 Jun 2011 14:50:27 -0700
Subject: Added prepend() to jqLite
---
test/jqLiteSpec.js | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
(limited to 'test')
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('
');
+ expect(root.prepend('
abc')).toEqual(root);
+ expect(root.html().toLowerCase()).toEqual('
abc');
+ });
+ it('should prepend to content', function(){
+ var root = jqLite('
text
');
+ expect(root.prepend('
abc')).toEqual(root);
+ expect(root.html().toLowerCase()).toEqual('
abctext');
+ });
+ it('should prepend text to content', function(){
+ var root = jqLite('
text
');
+ expect(root.prepend('abc')).toEqual(root);
+ expect(root.html().toLowerCase()).toEqual('abctext');
+ });
+ });
+
describe('remove', function(){
it('should remove', function(){
--
cgit v1.2.3