diff --git a/src/config/ormconfig.test.ts b/src/config/ormconfig.test.ts index 56e2cd8..f8caf39 100644 --- a/src/config/ormconfig.test.ts +++ b/src/config/ormconfig.test.ts @@ -7,12 +7,10 @@ import { ProductVariant } from '../entities/ProductVariant'; import { Attribute } from '../entities/Attribute'; import { AttributeValue } from '../entities/AttributeValue'; -const testDataSource = new DataSource({ - type: 'sqlite', +export const testDataSource = new DataSource({ + type: 'sqlite', database: ':memory:', - synchronize: true, + synchronize: true, + logging: true, entities: [TestEntity, User, Product, ProductType, ProductVariant, Attribute, AttributeValue], - logging: false, }); - -export default testDataSource; diff --git a/src/utils/test-utils.ts b/src/utils/test-utils.ts index efeb480..97bbeb7 100644 --- a/src/utils/test-utils.ts +++ b/src/utils/test-utils.ts @@ -1,4 +1,4 @@ -import testDataSource from "../config/ormconfig.test"; +import { testDataSource } from "../config/ormconfig.test"; export const setupTestDB = async () => { if (!testDataSource.isInitialized) {