From 47d93fd68da562c9b8ccbf7e06ab3f7fefbe39d8 Mon Sep 17 00:00:00 2001 From: shiyuhang <1136742008@qq.com> Date: Fri, 5 Jan 2024 10:52:01 +0800 Subject: [PATCH] test --- .github/workflows/integration-test.yml | 1 + integration-test/type.test.ts | 10 +++------- package-lock.json | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 9074dfd..b13b132 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -20,5 +20,6 @@ jobs: ${{ runner.os }}-node- - run: | npm ci + npm install export DATABASE_URL=${{ secrets.DATABASE_URL }} npm run integrationTest diff --git a/integration-test/type.test.ts b/integration-test/type.test.ts index aa1f710..1ab81ee 100644 --- a/integration-test/type.test.ts +++ b/integration-test/type.test.ts @@ -161,12 +161,8 @@ describe('types', () => { console.log(databaseURL) const con = connect({url: databaseURL, database: database, fetch}) await con.execute(`delete from ${table}`) - const x = await con.execute(insertSQL,null, {fullResult: true}) - console.log(x) - // const rows = await con.execute('select * from multi_data_type') as Row[] - const rows = await con.execute('select * from multi_data_type',null, {fullResult: true}) - console.log(rows) - // expect(rows.length).toEqual(1) - // expect(JSON.stringify(rows[0])).toEqual(JSON.stringify(fullTypeResult)) + const rows = await con.execute('select * from multi_data_type') as Row[] + expect(rows.length).toEqual(1) + expect(JSON.stringify(rows[0])).toEqual(JSON.stringify(fullTypeResult)) }) }) diff --git a/package-lock.json b/package-lock.json index 0b8128d..74a6a22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tidbcloud/serverless", - "version": "0.0.8", + "version": "0.0.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@tidbcloud/serverless", - "version": "0.0.8", + "version": "0.0.9", "license": "Apache-2.0", "devDependencies": { "@types/jest": "^29.5.3",