@@ -27,12 +27,14 @@ describe('Cursor', function() {
2727 } ) ;
2828
2929 describe ( 'isAtEnd()' , function ( ) {
30+
3031 it ( 'is true' , function ( ) {
3132 expect ( this . cursor . isAtEnd ( ) ) . toBe ( true ) ;
3233 } ) ;
3334 } ) ;
3435
3536 describe ( 'isAtBeginning()' , function ( ) {
37+
3638 it ( 'is false' , function ( ) {
3739 expect ( this . cursor . isAtBeginning ( ) ) . toBe ( false ) ;
3840 } ) ;
@@ -51,6 +53,28 @@ describe('Cursor', function() {
5153 expect ( this . cursor . isAtEnd ( ) ) . toBe ( true ) ;
5254 } ) ;
5355 } ) ;
54- } ) ;
5556
57+ describe ( 'insertAfter()' , function ( ) {
58+
59+ it ( 'can deal with an empty documentFragment' , function ( ) {
60+ var test = function ( ) {
61+ var frag = window . document . createDocumentFragment ( ) ;
62+ this . cursor . insertAfter ( frag ) ;
63+ }
64+ expect ( $ . proxy ( test , this ) ) . not . toThrow ( ) ;
65+ } ) ;
66+ } ) ;
67+
68+ describe ( 'insertBefore()' , function ( ) {
69+
70+ it ( 'can deal with an empty documentFragment' , function ( ) {
71+ var test = function ( ) {
72+ var frag = window . document . createDocumentFragment ( ) ;
73+ this . cursor . insertBefore ( frag ) ;
74+ }
75+ expect ( $ . proxy ( test , this ) ) . not . toThrow ( ) ;
76+ } ) ;
77+ } ) ;
78+
79+ } ) ;
5680} ) ;
0 commit comments