From 94a22b7e8f8ba7070c9001a5fdd3588a48fb037f Mon Sep 17 00:00:00 2001 From: Julien Ripouteau Date: Fri, 16 Feb 2024 14:57:19 +0100 Subject: [PATCH] test: fix for mssql --- test/database/drop_tables.spec.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/database/drop_tables.spec.ts b/test/database/drop_tables.spec.ts index c6526ef1..d863e354 100644 --- a/test/database/drop_tables.spec.ts +++ b/test/database/drop_tables.spec.ts @@ -122,9 +122,8 @@ test.group('Query client | drop tables', (group) => { }) await connection.client?.table('temp_users').insert({}) - await connection.client - ?.table('temp_posts') - .insert({ temp_users_id: await connection.client?.table('temp_users').select('id').first() }) + const user = await connection.client?.table('temp_users').select('id').first() + await connection.client?.table('temp_posts').insert({ temp_users_id: user!.id }) const client = new QueryClient('dual', connection, createEmitter()) await client.dialect.dropAllTables(['public'])