From 4ebb763cf3e7786a582dfe3888ed34dc10d499ca Mon Sep 17 00:00:00 2001 From: "Visal .In" Date: Thu, 21 Nov 2024 21:56:00 +0700 Subject: [PATCH] fixng snowflake test case --- tests/connections/connection.test.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/connections/connection.test.ts b/tests/connections/connection.test.ts index 21c1fe2..ffd547a 100644 --- a/tests/connections/connection.test.ts +++ b/tests/connections/connection.test.ts @@ -41,15 +41,19 @@ describe('Database Connection', () => { const sql = process.env.CONNECTION_TYPE === 'mysql' - ? 'SELECT CONCAT(:hello, :world) AS TESTING_WORD' - : 'SELECT (:hello || :world) AS TESTING_WORD'; + ? 'SELECT CONCAT(:hello, :world) AS testing_word' + : 'SELECT (:hello || :world) AS testing_word'; const { data } = await db.raw(sql, { hello: 'hello ', world: 'world', }); - expect(data).toEqual([{ TESTING_WORD: 'hello world' }]); + if (process.env.CONNECTION_TYPE === 'snowflake') { + expect(data).toEqual([{ TESTING_WORD: 'hello world' }]); + } else { + expect(data).toEqual([{ testing_word: 'hello world' }]); + } }); test('Support positional placeholder', async () => {