File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -38,3 +38,19 @@ test("multiple simple queries", function() {
3838 client . on ( 'drain' , client . end . bind ( client ) ) ;
3939} ) ;
4040
41+ test ( "multiple select statements" , function ( ) {
42+ var client = helper . client ( ) ;
43+ client . query ( "create temp table boom(age integer); insert into boom(age) values(1); insert into boom(age) values(2); insert into boom(age) values(3)" ) ;
44+ client . query ( "create temp table bang(name varchar(5)); insert into bang(name) values('zoom');" ) ;
45+ var result = client . query ( "select age from boom where age < 2; select name from bang" ) ;
46+ assert . emits ( result , 'row' , function ( row ) {
47+ assert . strictEqual ( row [ 0 ] , 1 ) ;
48+ assert . length ( row , 1 ) ;
49+ assert . emits ( result , 'row' , function ( row ) {
50+ assert . length ( row , 1 ) ;
51+ assert . strictEqual ( row [ 0 ] , 'zoom' ) ;
52+ } ) ;
53+ } ) ;
54+ client . on ( 'drain' , client . end . bind ( client ) ) ;
55+ } ) ;
56+
You can’t perform that action at this time.
0 commit comments