File tree Expand file tree Collapse file tree 1 file changed +19
-18
lines changed
Expand file tree Collapse file tree 1 file changed +19
-18
lines changed Original file line number Diff line number Diff line change @@ -16,31 +16,32 @@ describe('Pool', () => {
1616 //eat
1717 } ) ;
1818 } ) ;
19-
19+
2020 it ( 'pool metaAsArray' , function ( done ) {
2121 const pool = base . createPool ( {
2222 metaAsArray : true ,
2323 multipleStatements : true ,
2424 connectionLimit : 1
2525 } ) ;
2626 pool
27- . query ( 'DROP TABLE IF EXISTS t; ' +
28- 'CREATE TABLE t (i int);\n' +
29- 'INSERT INTO t(i) VALUES (1);\n' +
30- 'SELECT i FROM t; '
31- )
32- . then ( res => {
33- assert . equal ( 2 , res . length ) ;
34- assert . equal ( 4 , res [ 0 ] . length ) ;
35- assert . equal ( 4 , res [ 1 ] . length ) ;
36- assert . equal ( 'i' , res [ 1 ] [ 3 ] [ 0 ] . name ( ) ) ;
37- pool . end ( ) ;
38- done ( ) ;
39- } )
40- . catch ( err => {
41- pool . end ( ) ;
42- done ( err ) ;
43- } ) ;
27+ . query (
28+ 'DROP TABLE IF EXISTS t; ' +
29+ 'CREATE TABLE t (i int);\n' +
30+ 'INSERT INTO t(i) VALUES (1);\n' +
31+ 'SELECT i FROM t; '
32+ )
33+ . then ( res => {
34+ assert . equal ( 2 , res . length ) ;
35+ assert . equal ( 4 , res [ 0 ] . length ) ;
36+ assert . equal ( 4 , res [ 1 ] . length ) ;
37+ assert . equal ( 'i' , res [ 1 ] [ 3 ] [ 0 ] . name ( ) ) ;
38+ pool . end ( ) ;
39+ done ( ) ;
40+ } )
41+ . catch ( err => {
42+ pool . end ( ) ;
43+ done ( err ) ;
44+ } ) ;
4445 } ) ;
4546
4647 it ( 'pool escape' , function ( ) {
You can’t perform that action at this time.
0 commit comments