Skip to content

Commit 5daa583

Browse files
committed
Test for CASE inside BETWEEN
1 parent 4bb9cdd commit 5daa583

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/features/between.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,12 @@ export default function supportsBetween(format: FormatFn) {
2121
// Not ideal, but better than crashing
2222
expect(format('foo BETWEEN 1+2 AND 3+4')).toBe('foo BETWEEN 1 + 2 AND 3 + 4');
2323
});
24+
25+
it('supports CASE inside BETWEEN', () => {
26+
expect(format('foo BETWEEN CASE x WHEN 1 THEN 2 END AND 3')).toBe(dedent`
27+
foo BETWEEN CASE x
28+
WHEN 1 THEN 2
29+
END AND 3
30+
`);
31+
});
2432
}

0 commit comments

Comments
 (0)