@@ -728,15 +728,19 @@ describe("Mitm", function() {
728
728
} )
729
729
} )
730
730
731
- describe ( ".prototype.addListener" , function ( ) {
732
- it ( "must be an alias to EventEmitter.prototype.addListener" , function ( ) {
733
- Mitm . prototype . addListener . must . equal ( EventEmitter . prototype . addListener )
734
- } )
735
- } )
736
-
737
- describe ( ".prototype.off" , function ( ) {
738
- it ( "must be an alias to EventEmitter.prototype.removeListener" , function ( ) {
739
- Mitm . prototype . off . must . equal ( EventEmitter . prototype . removeListener )
731
+ _ . each ( {
732
+ on : EventEmitter . prototype . on ,
733
+ once : EventEmitter . prototype . once ,
734
+ off : EventEmitter . prototype . removeListener ,
735
+ addListener : EventEmitter . prototype . addListener ,
736
+ removeListener : EventEmitter . prototype . removeListener ,
737
+ emit : EventEmitter . prototype . emit
738
+ } , function ( to , from ) {
739
+ describe ( ".prototype." + from , function ( ) {
740
+ it ( "must be an alias to EventEmitter.prototype" , function ( ) {
741
+ Mitm . prototype . must . have . property ( from , to )
742
+ Mitm . prototype [ from ] . must . be . a . function ( )
743
+ } )
740
744
} )
741
745
} )
742
746
} )
0 commit comments