fix(medusa-test-utils): Run with modules without models (#9062)
* fix(medusa-test-utils): Run with modules without models * cleanup * rm dummy model * rm dummy model * improve models loading * find models * find models * find models * finalize * cleanup * fix deps * fix deps * fix deps * fix deps * fix deps
This commit is contained in:
committed by
GitHub
parent
36f30b4833
commit
e56607c97c
@@ -1,19 +1,11 @@
|
||||
import { resolve } from "path"
|
||||
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||
import { Entity, PrimaryKey } from "@mikro-orm/core"
|
||||
import { IFileModuleService } from "@medusajs/types"
|
||||
import { Module, Modules } from "@medusajs/utils"
|
||||
import { FileModuleService } from "@services"
|
||||
|
||||
jest.setTimeout(100000)
|
||||
|
||||
// The test runner throws if a model is not passed, so we create a dummy entity
|
||||
@Entity({ tableName: "dummy_file_entity" })
|
||||
export default class DummyEntity {
|
||||
@PrimaryKey()
|
||||
id: string
|
||||
}
|
||||
|
||||
const moduleOptions = {
|
||||
providers: [
|
||||
{
|
||||
@@ -29,7 +21,6 @@ const moduleOptions = {
|
||||
moduleIntegrationTestRunner<IFileModuleService>({
|
||||
moduleName: Modules.FILE,
|
||||
moduleOptions: moduleOptions,
|
||||
moduleModels: [DummyEntity],
|
||||
testSuite: ({ service }) => {
|
||||
describe("File Module Service", () => {
|
||||
it(`should export the appropriate linkable configuration`, () => {
|
||||
|
||||
Reference in New Issue
Block a user