@@ -66,19 +66,15 @@ module.exports = {
6666 "returns a new selection" : function ( span ) {
6767 assert . isFalse ( span . filter ( function ( ) { return 1 ; } ) === span ) ;
6868 } ,
69- "inherits the delay" : function ( t1 ) {
70- var t2 = t1 . filter ( function ( ) { return 1 ; } ) ;
71- assert . equal ( t2 [ 0 ] [ 0 ] . __transition__ [ t2 . id ] . delay , 100 ) ; // TODO should inherit the whole transition object
72- } ,
73- "inherits the duration" : function ( t1 ) {
74- var t2 = t1 . filter ( function ( ) { return 1 ; } ) ;
75- assert . equal ( t2 [ 0 ] [ 0 ] . __transition__ [ t2 . id ] . duration , 150 ) ;
76- } ,
77- "inherits easing" : function ( t1 ) {
78- // TODO how to test this?
69+ "works on empty selections" : function ( span ) {
70+ var none = function ( ) { return false ; } ,
71+ empty = span . filter ( none ) ;
72+ assert . isTrue ( empty . empty ( ) ) ;
73+ assert . isTrue ( empty . filter ( none ) . empty ( ) ) ;
7974 } ,
80- "inherits the transition id" : function ( t1 ) {
75+ "inherits the transition id and, by extension, all transition parameters " : function ( t1 ) {
8176 var t2 = t1 . filter ( function ( ) { return 1 ; } ) ;
8277 assert . equal ( t2 . id , t1 . id ) ;
78+ assert . strictEqual ( t2 [ 0 ] [ 0 ] . __transition__ [ t2 . id ] , t1 [ 0 ] [ 0 ] . __transition__ [ t1 . id ] ) ;
8379 }
8480} ;
0 commit comments