mirror of
https://github.com/mariadb-corporation/mariadb-connector-nodejs.git
synced 2025-08-10 01:30:22 +00:00
[misc] test correction
This commit is contained in:
@ -6,7 +6,8 @@ const { isXpand } = require('../../base');
|
|||||||
|
|
||||||
describe('time', () => {
|
describe('time', () => {
|
||||||
it('time data', async function () {
|
it('time data', async function () {
|
||||||
if (!base.utf8Collation()) this.skip();
|
// skipping test for mysql since TIME doesn't have microseconds
|
||||||
|
if (!shareConn.info.isMariaDB()) this.skip();
|
||||||
|
|
||||||
await shareConn.query('DROP TABLE IF EXISTS time_data');
|
await shareConn.query('DROP TABLE IF EXISTS time_data');
|
||||||
await shareConn.query('CREATE TABLE time_data(t1 time(6), t2 time(6))');
|
await shareConn.query('CREATE TABLE time_data(t1 time(6), t2 time(6))');
|
||||||
|
@ -76,9 +76,6 @@ async function testMisc(): Promise<void> {
|
|||||||
const res2 = await connection.query<UpsertResult>('INSERT INTO myTable VALUE (1)');
|
const res2 = await connection.query<UpsertResult>('INSERT INTO myTable VALUE (1)');
|
||||||
console.log(res2.insertId === 1);
|
console.log(res2.insertId === 1);
|
||||||
|
|
||||||
const res3 = await connection.query<any[]>('INSERT INTO myTable VALUE (1)');
|
|
||||||
console.log(res3[0].tt === 1);
|
|
||||||
|
|
||||||
rows = await connection.query('SELECT 1 + 1 AS solution');
|
rows = await connection.query('SELECT 1 + 1 AS solution');
|
||||||
console.log(rows[0].solution === 2);
|
console.log(rows[0].solution === 2);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user