feat: Application types generation from project GQL schema's (#8995)
This commit is contained in:
committed by
GitHub
parent
ac30a989f4
commit
2c5e72d141
@@ -1,12 +1,12 @@
|
||||
import { IApiKeyModuleService } from "@medusajs/types"
|
||||
import { ApiKeyType, Module, Modules } from "@medusajs/utils"
|
||||
import { ApiKeyModuleService } from "@services"
|
||||
import crypto from "crypto"
|
||||
import { moduleIntegrationTestRunner } from "medusa-test-utils"
|
||||
import {
|
||||
createPublishableKeyFixture,
|
||||
createSecretKeyFixture,
|
||||
} from "../__fixtures__"
|
||||
import { ApiKeyModuleService } from "@services"
|
||||
|
||||
jest.setTimeout(100000)
|
||||
|
||||
@@ -47,7 +47,9 @@ moduleIntegrationTestRunner<IApiKeyModuleService>({
|
||||
|
||||
expect(Object.keys(linkable)).toEqual(["apiKey"])
|
||||
|
||||
linkable.apiKey.toJSON = undefined
|
||||
Object.keys(linkable).forEach((key) => {
|
||||
delete linkable[key].toJSON
|
||||
})
|
||||
|
||||
expect(linkable.apiKey).toEqual({
|
||||
id: {
|
||||
@@ -56,6 +58,12 @@ moduleIntegrationTestRunner<IApiKeyModuleService>({
|
||||
serviceName: "apiKey",
|
||||
field: "apiKey",
|
||||
},
|
||||
publishable_key_id: {
|
||||
field: "apiKey",
|
||||
linkable: "publishable_key_id",
|
||||
primaryKey: "publishable_key_id",
|
||||
serviceName: "apiKey",
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user