Skip to content

Commit 3ebd3d8

Browse files
committed
Move one more comment-test to comments.js
1 parent 3fe56d9 commit 3ebd3d8

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

test/behavesLikeSqlFormatter.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -308,18 +308,6 @@ export default function behavesLikeSqlFormatter(language) {
308308
`);
309309
});
310310

311-
it('formats query that ends with open comment', () => {
312-
const result = format(`
313-
SELECT count(*)
314-
/*Comment
315-
`);
316-
expect(result).toBe(dedent`
317-
SELECT
318-
count(*)
319-
/*Comment
320-
`);
321-
});
322-
323311
it('formats UPDATE query with AS part', () => {
324312
const result = format(
325313
'UPDATE customers SET total_orders = order_summary.total FROM ( SELECT * FROM bank) AS order_summary'

test/features/comments.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,16 @@ export default function supportsComments(language) {
107107
const result = format('SELECT * FROM\r\n-- line comment 1\r\nMyTable -- line comment 2\r\n');
108108
expect(result).toBe('SELECT\n *\nFROM\n -- line comment 1\n MyTable -- line comment 2');
109109
});
110+
111+
it('formats query that ends with open comment', () => {
112+
const result = format(`
113+
SELECT count(*)
114+
/*Comment
115+
`);
116+
expect(result).toBe(dedent`
117+
SELECT
118+
count(*)
119+
/*Comment
120+
`);
121+
});
110122
}

0 commit comments

Comments
 (0)