fix tests
This commit is contained in:
parent
6541f6d31f
commit
8f0a234ae3
|
@ -51,6 +51,7 @@ const ACTION_IMPLS: ActionImplType = {
|
|||
QUERY_ROWS: queryRow.run,
|
||||
COLLECT: collect.run,
|
||||
TRIGGER_AUTOMATION_RUN: triggerAutomationRun.run,
|
||||
OPENAI: openai.run,
|
||||
// these used to be lowercase step IDs, maintain for backwards compat
|
||||
discord: discord.run,
|
||||
slack: slack.run,
|
||||
|
@ -107,8 +108,6 @@ export async function getActionDefinitions() {
|
|||
(await features.flags.isEnabled(FeatureFlag.AI_CUSTOM_CONFIGS))
|
||||
) {
|
||||
BUILTIN_ACTION_DEFINITIONS["OPENAI"] = openai.definition
|
||||
// @ts-ignore
|
||||
ACTION_IMPLS["OPENAI"] = openai.run
|
||||
}
|
||||
|
||||
const actionDefinitions = BUILTIN_ACTION_DEFINITIONS
|
||||
|
|
|
@ -126,16 +126,16 @@ export type ActionImplementations<T extends Hosting> = {
|
|||
n8nStepInputs,
|
||||
ExternalAppStepOutputs
|
||||
>
|
||||
[AutomationActionStepId.OPENAI]: ActionImplementation<
|
||||
OpenAIStepInputs,
|
||||
OpenAIStepOutputs
|
||||
>
|
||||
} & (T extends "self"
|
||||
? {
|
||||
[AutomationActionStepId.EXECUTE_BASH]: ActionImplementation<
|
||||
BashStepInputs,
|
||||
BashStepOutputs
|
||||
>
|
||||
[AutomationActionStepId.OPENAI]: ActionImplementation<
|
||||
OpenAIStepInputs,
|
||||
OpenAIStepOutputs
|
||||
>
|
||||
}
|
||||
: {})
|
||||
|
||||
|
|
|
@ -13,10 +13,6 @@ describe("Global configs controller", () => {
|
|||
await config.afterAll()
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
jest.resetAllMocks()
|
||||
})
|
||||
|
||||
it("Should strip secrets when pulling AI config", async () => {
|
||||
const data = structures.configs.ai()
|
||||
await config.api.configs.saveConfig(data)
|
||||
|
|
Loading…
Reference in New Issue