File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -93,11 +93,20 @@ test('executing query', function() {
9393 } ) ;
9494 var handledAgain = con . emit ( 'dataRow' , { fields : [ "bye" ] } ) ;
9595 assert . ok ( handledAgain , "should have handled seciond data row message" ) ;
96+ } ) ;
9697
98+ //multiple command complete messages will be sent
99+ //when multiple queries are in a simple command
100+ test ( 'handles command complete messages' , function ( ) {
101+ con . emit ( 'commandComplete' , {
102+ text : 'INSERT 31 1'
103+ } ) ;
97104 } ) ;
98105
99106 test ( 'removes itself after another readyForQuery message' , function ( ) {
100- assert . raises ( query , "end" ) ;
107+ assert . raises ( query , "end" , function ( msg ) {
108+ //TODO do we want to check the complete messages?
109+ } ) ;
101110 con . emit ( "readyForQuery" ) ;
102111 //this would never actually happen
103112 [ 'dataRow' , 'rowDescritpion' , 'commandComplete' ] . forEach ( function ( msg ) {
You can’t perform that action at this time.
0 commit comments