Skip to content

Commit 9e6100e

Browse files
committed
test(fixtures): format sql fixture files with sql-formatter
1 parent 5f3cc4c commit 9e6100e

File tree

4 files changed

+26
-8
lines changed

4 files changed

+26
-8
lines changed

tests/fixtures/duplicate-vars.sql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
SELECT * FROM {{table}} WHERE name = '{{name}}' OR alias = '{{name}}'
1+
SELECT
2+
*
3+
FROM
4+
{{table}}
5+
WHERE
6+
name = '{{name}}'
7+
OR alias = '{{name}}'

tests/fixtures/getEvents.sql

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
SELECT event_id, event_name
2-
FROM {{tableName}}
3-
WHERE status = '{{status}}'
1+
SELECT
2+
event_id,
3+
event_name
4+
FROM
5+
{{tableName}}
6+
WHERE
7+
status = '{{status}}'
48
AND created_at >= '{{startDate}}'
5-
ORDER BY {{orderBy}}
6-
LIMIT {{limit}}
9+
ORDER BY
10+
{{orderBy}}
11+
LIMIT
12+
{{limit}}

tests/fixtures/no-vars.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
SELECT 1
1+
SELECT
2+
1

tests/fixtures/simple.sql

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
SELECT * FROM {{table}} WHERE id = {{id}}
1+
SELECT
2+
*
3+
FROM
4+
{{table}}
5+
WHERE
6+
id = {{id}}

0 commit comments

Comments
 (0)