File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed
Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change 11var helper = require ( __dirname + '/test-helper' ) ;
22
33test ( "noData message handling" , function ( ) {
4- return false ;
4+
55 var client = helper . client ( ) ;
66
77 client . query ( {
@@ -19,22 +19,17 @@ test("noData message handling", function() {
1919 name : 'insert' ,
2020 values : [ 101 ]
2121 } ) ;
22-
23- client . connection . on ( 'message' , console . log ) ;
24-
25- var x = client . query ( {
22+
23+ var query = client . query ( {
2624 name : 'fetch' ,
27- text : 'select size from boom'
25+ text : 'select size from boom where size < $1' ,
26+ values : [ 101 ]
2827 } ) ;
2928
30- assert . raises ( x , 'row' , function ( row ) {
31- assert . equal ( row . fields [ 0 ] , 100 ) ;
32-
33- assert . raises ( x , 'row' , function ( row ) {
34- assert . equal ( row . fields [ 0 ] , 101 ) ;
35- } ) ;
29+ assert . raises ( query , 'row' , function ( row ) {
30+ assert . strictEqual ( row . fields [ 0 ] , 100 )
3631 } ) ;
37-
38- x . on ( 'end ' , query . end ( ) ) ;
32+
33+ client . on ( 'drain ' , client . end . bind ( client ) ) ;
3934
4035} ) ;
You can’t perform that action at this time.
0 commit comments