fix: normalize path before consuming it while loading models (#8194)
* fix: normalize path before consuming it while loading models * Make it so that models derived from the service if present * fix linkable tests that now match what has been passed to the medusa service if there is no custom joiner config * fix linkable tests that now match what has been passed to the medusa service if there is no custom joiner config * fix linkable tests that now match what has been passed to the medusa service if there is no custom joiner config
This commit is contained in:
@@ -33,21 +33,13 @@ moduleIntegrationTestRunner<IUserModuleService>({
|
||||
service: UserModuleService,
|
||||
}).linkable
|
||||
|
||||
expect(Object.keys(linkable)).toEqual(["invite", "user"])
|
||||
expect(Object.keys(linkable)).toEqual(["user", "invite"])
|
||||
|
||||
Object.keys(linkable).forEach((key) => {
|
||||
delete linkable[key].toJSON
|
||||
})
|
||||
|
||||
expect(linkable).toEqual({
|
||||
invite: {
|
||||
id: {
|
||||
linkable: "invite_id",
|
||||
primaryKey: "id",
|
||||
serviceName: "user",
|
||||
field: "invite",
|
||||
},
|
||||
},
|
||||
user: {
|
||||
id: {
|
||||
linkable: "user_id",
|
||||
@@ -56,6 +48,14 @@ moduleIntegrationTestRunner<IUserModuleService>({
|
||||
field: "user",
|
||||
},
|
||||
},
|
||||
invite: {
|
||||
id: {
|
||||
linkable: "invite_id",
|
||||
primaryKey: "id",
|
||||
serviceName: "user",
|
||||
field: "invite",
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user