save data query test - to be fixed!

This commit is contained in:
Jan Prochazka 2021-05-30 09:01:00 +02:00
parent 0a06ebf9c3
commit 93edcc4d0a

View File

@ -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();
})
);
});