Skip to content

Commit f0d06c9

Browse files
committed
add multi-line comment in test case
1 parent 6709faa commit f0d06c9

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

packages/core/test/template-engine/built-in-extensions/cache/cache.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,17 @@ it('Extension should remove comments in sql statements', async () => {
187187
} = await createTestCompiler();
188188
const { compiledData } = await compiler.compile(`
189189
-- this is comment1
190+
/*
191+
this is multiline comments
192+
*/
190193
{% cache %} -- this is comment2
191194
select count(*) as count from vulcan.user where user.id = {{ context.params.userId }}; -- this is comment3
192195
{% endcache %} -- this is comment4
193196
-- this is comment5
197+
198+
/*
199+
this is multiline comments
200+
*/
194201
`);
195202
builder.value.onFirstCall().resolves({
196203
getColumns: () => [],

packages/core/test/template-engine/built-in-extensions/query-builder/builder.spec.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ it('Extension should throw error when no profile defined', async () => {
168168
);
169169
});
170170

171-
it('xtension should remove comments in sql statements', async () => {
171+
it('Extension should remove comments in sql statements', async () => {
172172
// Arrange
173173
const {
174174
compiler,
@@ -180,12 +180,22 @@ it('xtension should remove comments in sql statements', async () => {
180180
} = await createTestCompiler();
181181
const { compiledData } = await compiler.compile(`
182182
-- this is comment1
183+
/*
184+
this is multiline comments
185+
*/
183186
{% req userCount main %} -- this is comment2
187+
/*
188+
this is multiline comments
189+
*/
184190
-- this is comment3
185191
select count(*) as count from user where user.id = {{ context.params.userId }}; -- this is comment4
186192
-- this is comment5
187193
{% endreq %}
188194
195+
/*
196+
this is multiline comments
197+
*/
198+
189199
-- this is comment6
190200
`);
191201
builder.value.onFirstCall().resolves({

0 commit comments

Comments
 (0)