mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
fix: parse res to int in tests
This commit is contained in:
@@ -133,14 +133,16 @@ describe('DB Import/export', () => {
|
||||
for (const check of engine.dumpChecks || []) {
|
||||
const res = await driver.query(conn, check.sql);
|
||||
const cnt = parseInt(res.rows[0].res.toString());
|
||||
expect(cnt).toEqual(check.res);
|
||||
expect(cnt).toEqual(parseInt(check.res));
|
||||
}
|
||||
|
||||
// const res1 = await driver.query(conn, `select count(*) as cnt from t1`);
|
||||
// expect(res1.rows[0].cnt.toString()).toEqual('6');
|
||||
const res1 = await driver.query(conn, `select count(*) as cnt from t1`);
|
||||
const cnt1 = parseInt(res1.rows[0].cnt.toString());
|
||||
expect(cnt1).toEqual(6);
|
||||
|
||||
// const res2 = await driver.query(conn, `select count(*) as cnt from t2`);
|
||||
// expect(res2.rows[0].cnt.toString()).toEqual('6');
|
||||
const res2 = await driver.query(conn, `select count(*) as cnt from t2`);
|
||||
const cnt2 = parseInt(res2.rows[0].cnt.toString());
|
||||
expect(cnt2).toEqual(6);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user