From 81c4c11c65c279330ac9ea774e422792551750c1 Mon Sep 17 00:00:00 2001 From: cgoing Date: Tue, 23 Jul 2024 23:49:08 +0900 Subject: [PATCH] Configure DataSource for testing with autoSave disabled and schema dropping enabled --- .../packages/typeorm-service/__test__/typeorm.test.ts | 2 ++ .../with-typeorm/packages/typeorm-service/src/orm-config.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/examples/with-typeorm/packages/typeorm-service/__test__/typeorm.test.ts b/examples/with-typeorm/packages/typeorm-service/__test__/typeorm.test.ts index 8ebf042b42319..28aaa562dfed6 100755 --- a/examples/with-typeorm/packages/typeorm-service/__test__/typeorm.test.ts +++ b/examples/with-typeorm/packages/typeorm-service/__test__/typeorm.test.ts @@ -35,6 +35,8 @@ suite("typeorm with SQL.js", () => { type: "sqljs", entities: [Todo], synchronize: true, + autoSave: false, + dropSchema: true, }); await dataSource.initialize(); diff --git a/examples/with-typeorm/packages/typeorm-service/src/orm-config.ts b/examples/with-typeorm/packages/typeorm-service/src/orm-config.ts index 80c91a61a049f..4a421b3c8e561 100755 --- a/examples/with-typeorm/packages/typeorm-service/src/orm-config.ts +++ b/examples/with-typeorm/packages/typeorm-service/src/orm-config.ts @@ -7,4 +7,6 @@ export const AppDataSource = new DataSource({ synchronize: true, logging: true, entities: [Todo], + autoSave: false, + dropSchema: true, });