chore: Cleanup utils package (#9238)

Fixes: FRMW-2712

Old PR: https://github.com/medusajs/medusa/pull/9234 Closed because of incorrect branch naming

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
This commit is contained in:
Harminder Virk
2024-09-23 16:07:58 +05:30
committed by GitHub
parent 79e3578932
commit 97e003ef4f
17 changed files with 138 additions and 75 deletions
@@ -70,7 +70,7 @@ describe.skip("Revert migrations", () => {
const results = await migrations.revert()
const orm = await MikroORM.init(config)
const usersTableExists = await orm.em.getKnex().schema.hasTable("user")
const usersTableExists = await orm.em["getKnex"]().schema.hasTable("user")
await orm.close()
expect(results).toHaveLength(1)
@@ -171,7 +171,7 @@ describe.skip("Revert migrations", () => {
expect(migrations.revert()).rejects.toThrow(/.*Migration.*/)
const orm = await MikroORM.init(config)
const usersTableExists = await orm.em.getKnex().schema.hasTable("user")
const usersTableExists = await orm.em["getKnex"]().schema.hasTable("user")
await orm.close()
expect(usersTableExists).toEqual(true)
@@ -70,7 +70,7 @@ describe.skip("Run migrations", () => {
const results = await migrations.run()
const orm = await MikroORM.init(config)
const usersTableExists = await orm.em.getKnex().schema.hasTable("user")
const usersTableExists = await orm.em["getKnex"]().schema.hasTable("user")
await orm.close()
expect(results).toHaveLength(1)
@@ -168,7 +168,7 @@ describe.skip("Run migrations", () => {
expect(migrations.run()).rejects.toThrow(/.*Migration.*/)
const orm = await MikroORM.init(config)
const usersTableExists = await orm.em.getKnex().schema.hasTable("user")
const usersTableExists = await orm.em["getKnex"]().schema.hasTable("user")
await orm.close()