File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -5,14 +5,14 @@ import { FormatFn } from '../../src/sqlFormatter.js';
55export default function supportsCase ( format : FormatFn ) {
66 it ( 'formats CASE ... WHEN with a blank expression' , ( ) => {
77 const result = format (
8- "CASE WHEN option = 'foo' THEN 1 WHEN option = 'bar' THEN 2 WHEN option = 'baz' THEN 3 ELSE 4 END;"
8+ "CASE WHEN opt = 'foo' THEN 1 WHEN opt = 'bar' THEN 2 WHEN opt = 'baz' THEN 3 ELSE 4 END;"
99 ) ;
1010
1111 expect ( result ) . toBe ( dedent `
1212 CASE
13- WHEN option = 'foo' THEN 1
14- WHEN option = 'bar' THEN 2
15- WHEN option = 'baz' THEN 3
13+ WHEN opt = 'foo' THEN 1
14+ WHEN opt = 'bar' THEN 2
15+ WHEN opt = 'baz' THEN 3
1616 ELSE 4
1717 END;
1818 ` ) ;
@@ -53,11 +53,11 @@ export default function supportsCase(format: FormatFn) {
5353 } ) ;
5454
5555 it ( 'recognizes lowercase CASE ... END' , ( ) => {
56- const result = format ( "case when option = 'foo' then 1 else 2 end;" ) ;
56+ const result = format ( "case when opt = 'foo' then 1 else 2 end;" ) ;
5757
5858 expect ( result ) . toBe ( dedent `
5959 case
60- when option = 'foo' then 1
60+ when opt = 'foo' then 1
6161 else 2
6262 end;
6363 ` ) ;
Original file line number Diff line number Diff line change @@ -138,8 +138,8 @@ describe('TransactSqlFormatter', () => {
138138 ` ) ;
139139 } ) ;
140140
141- it ( 'formats SELECT ... OPTIONS ()' , ( ) => {
142- const result = format ( 'SELECT col OPTIONS (MAXRECURSION 5)' ) ;
141+ it ( 'formats SELECT ... OPTION ()' , ( ) => {
142+ const result = format ( 'SELECT col OPTION (MAXRECURSION 5)' ) ;
143143 expect ( result ) . toBe ( dedent `
144144 SELECT
145145 col
You can’t perform that action at this time.
0 commit comments