Skip to content

Commit 4ef40e0

Browse files
committed
Add test for prefix aliases
1 parent f9575c0 commit 4ef40e0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/duckdb.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@ describe('DuckDBFormatter', () => {
101101
supportsParams(format, { positional: true, numbered: ['$'], quoted: ['$""'] });
102102
supportsLimiting(format, { limit: true, offset: true });
103103

104+
it('formats prefix aliases', () => {
105+
expect(format("SELECT foo:10, bar:'hello';")).toBe(dedent`
106+
SELECT
107+
foo: 10,
108+
bar: 'hello';
109+
`);
110+
});
111+
104112
it('formats {} struct literal (string keys)', () => {
105113
expect(format("SELECT {'id':1,'type':'Tarzan'} AS obj;")).toBe(dedent`
106114
SELECT

0 commit comments

Comments
 (0)