From 93edcc4d0ad38d0ff1931d740864684e046c45ad Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sun, 30 May 2021 09:01:00 +0200 Subject: [PATCH] save data query test - to be fixed! --- integration-tests/__tests__/query.spec.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/integration-tests/__tests__/query.spec.js b/integration-tests/__tests__/query.spec.js index aaadf82a..df1c10cd 100644 --- a/integration-tests/__tests__/query.spec.js +++ b/integration-tests/__tests__/query.spec.js @@ -124,4 +124,18 @@ describe('Query', () => { }) ); + test.each(engines.map(engine => [engine.label, engine]))( + 'Save data query - %s', + testWrapper(async (conn, driver, engine) => { + for (const sql of initSql) await driver.query(conn, sql); + + await driver.query( + conn, + 'INSERT INTO t1 (id) VALUES (3);INSERT INTO t1 (id) VALUES (4);UPDATE t1 SET id=10 WHERE id=1;DELETE FROM t1 WHERE id=2;' + ); + const res = await driver.query(conn, 'SELECT COUNT(*) AS cnt FROM t1'); + console.log(res); + expect(res.rows[0].cnt == 3).toBeTruthy(); + }) + ); });