Files
medusa-store/packages/user/integration-tests/utils/database.ts
Adrien de Peretti 1d91b7429b feat(fulfillment): implementation part 2 (#6408)
**What**

> [!NOTE]  
> I can see this pr becoming huge, so I d like to get this partial one merged 👍 


- Fixes shared connection usage (mikro orm compare the instance to its own package and therefore was resulting in not trully reusing the provided connection leading to exhausting the connection pool as multiple connections was created and end up not being all destroyed properly under the hood, discovered in my integration tests)
- Create shipping options method implementation
- DTO's definition and service interface update
- integration tests 
- Re work of the indexes with new util update
- Test runner utils to remove a big chunk of the boilerplate of the packages integrations

FIXES CORE-1742
2024-02-19 12:33:46 +00:00

19 lines
480 B
TypeScript

import * as UserModels from "@models"
import {TestDatabaseUtils} from "medusa-test-utils"
const pathToMigrations = "../../src/migrations"
const mikroOrmEntities = UserModels as unknown as any[]
export const MikroOrmWrapper = TestDatabaseUtils.getMikroOrmWrapper({
mikroOrmEntities,
pathToMigrations,
})
export const MikroOrmConfig = TestDatabaseUtils.getMikroOrmConfig({
mikroOrmEntities,
pathToMigrations,
})
export const DB_URL = TestDatabaseUtils.getDatabaseURL()