@@ -25,7 +25,7 @@ it('simple SelectStmt', () => {
2525 ( stmt . SelectStmt . fromClause [ 0 ] as { RangeVar : RangeVar } ) . RangeVar . relname = 'another_table' ;
2626
2727 expect ( stmt ) . toMatchSnapshot ( ) ;
28- expect ( deparse ( stmt ) ) . toMatchSnapshot ( ) ;
28+ expect ( deparse ( stmt , { pretty : false } ) ) . toMatchSnapshot ( ) ;
2929} ) ;
3030
3131it ( 'SelectStmt with WHERE clause' , ( ) => {
@@ -68,7 +68,7 @@ it('SelectStmt with WHERE clause', () => {
6868 op : 'SETOP_NONE'
6969 } ) ;
7070
71- expect ( deparse ( selectStmt , { } ) ) . toEqual ( `SELECT * FROM myschema.mytable WHERE a = CAST('t' AS boolean)` ) ;
71+ expect ( deparse ( selectStmt , { pretty : false } ) ) . toEqual ( `SELECT * FROM myschema.mytable WHERE a = CAST('t' AS boolean)` ) ;
7272} ) ;
7373
7474it ( 'queries' , ( ) => {
@@ -106,7 +106,7 @@ it('queries', () => {
106106 op : 'SETOP_NONE'
107107 } ) ;
108108
109- expect ( deparse ( query , { } ) ) . toEqual ( `SELECT name, email FROM users WHERE age > 18` ) ;
109+ expect ( deparse ( query , { pretty : false } ) ) . toEqual ( `SELECT name, email FROM users WHERE age > 18` ) ;
110110
111111} ) ;
112112it ( 'dynamic creation of tables' , ( ) => {
@@ -142,6 +142,6 @@ it('dynamic creation of tables', () => {
142142 } ) ;
143143
144144 // `deparse` function converts AST to SQL string
145- const sql = deparse ( createStmt ) ;
145+ const sql = deparse ( createStmt , { pretty : false } ) ;
146146 expect ( sql ) . toMatchSnapshot ( ) ;
147- } )
147+ } )
0 commit comments