diff --git a/src/types/toolOpts.ts b/src/types/toolOpts.ts index 25234c8..f3c25b7 100644 --- a/src/types/toolOpts.ts +++ b/src/types/toolOpts.ts @@ -22,6 +22,7 @@ export interface GeneralPrompt { export interface Answers extends Record { _path: string; + _language: Language; } export type HandleGeneralPromptsCallback = ( diff --git a/src/utils/index.test.ts b/src/utils/index.test.ts index ef6e208..b09eba3 100644 --- a/src/utils/index.test.ts +++ b/src/utils/index.test.ts @@ -112,13 +112,21 @@ describe("utils", () => { describe("baseGeneralPromptsHandler", () => { it("should set baseUrl", async () => { - const result = await utils.baseGeneralPromptsHandler({} as HermioneConfig, { _path: "/", baseUrl: "foo" }); + const result = await utils.baseGeneralPromptsHandler({} as HermioneConfig, { + _path: "/", + _language: "ts", + baseUrl: "foo", + }); expect(result).toStrictEqual({ baseUrl: "foo" }); }); it("should set gridUrl", async () => { - const result = await utils.baseGeneralPromptsHandler({} as HermioneConfig, { _path: "/", gridUrl: "foo" }); + const result = await utils.baseGeneralPromptsHandler({} as HermioneConfig, { + _path: "/", + _language: "ts", + gridUrl: "foo", + }); expect(result).toStrictEqual({ gridUrl: "foo" }); }); @@ -128,6 +136,7 @@ describe("utils", () => { const result = await utils.baseGeneralPromptsHandler({} as HermioneConfig, { _path: "/", + _language: "ts", addChromePhone: true, }); @@ -152,7 +161,10 @@ describe("utils", () => { }); it("should do nothing if no answers given", async () => { - const result = await utils.baseGeneralPromptsHandler({} as HermioneConfig, { _path: "/" }); + const result = await utils.baseGeneralPromptsHandler({} as HermioneConfig, { + _path: "/", + _language: "ts", + }); expect(result).toStrictEqual({}); });