fix the broken E2E tests due to the addition of OCO_GITPUSH (#321)

* test(oneFile.test.ts): update test expectations to match new push prompt text

* build
This commit is contained in:
Takanori Matsumoto
2024-04-13 21:42:32 +09:00
committed by GitHub
parent a4480893cb
commit 91399a0c68
3 changed files with 33 additions and 11 deletions
+14 -4
View File
@@ -24244,10 +24244,11 @@ var configValidators = {
"gpt-3.5-turbo-0125",
"gpt-4",
"gpt-4-1106-preview",
"gpt-4-turbo-preview",
"gpt-4-0125-preview"
"gpt-4-0125-preview",
"gpt-4-turbo",
"gpt-4-turbo-preview"
].includes(value),
`${value} is not supported yet, use 'gpt-4', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-turbo-preview' or 'gpt-4-0125-preview'`
`${value} is not supported yet, use 'gpt-4', 'gpt-4-turbo', 'gpt-3.5-turbo' (default), 'gpt-3.5-turbo-0125', 'gpt-4-1106-preview', 'gpt-4-0125-preview' or 'gpt-4-turbo-preview'`
);
return value;
},
@@ -24267,6 +24268,14 @@ var configValidators = {
);
return value;
},
["OCO_GITPUSH" /* OCO_GITPUSH */](value) {
validateConfig(
"OCO_GITPUSH" /* OCO_GITPUSH */,
typeof value === "boolean",
"Must be true or false"
);
return value;
},
["OCO_AI_PROVIDER" /* OCO_AI_PROVIDER */](value) {
validateConfig(
"OCO_AI_PROVIDER" /* OCO_AI_PROVIDER */,
@@ -24303,6 +24312,7 @@ var getConfig = () => {
OCO_MESSAGE_TEMPLATE_PLACEHOLDER: process.env.OCO_MESSAGE_TEMPLATE_PLACEHOLDER || "$msg",
OCO_PROMPT_MODULE: process.env.OCO_PROMPT_MODULE || "conventional-commit",
OCO_AI_PROVIDER: process.env.OCO_AI_PROVIDER || "openai",
OCO_GITPUSH: process.env.OCO_GITPUSH === "false" ? false : true,
OCO_ONE_LINE_COMMIT: process.env.OCO_ONE_LINE_COMMIT === "true" ? true : false
};
const configExists = (0, import_fs.existsSync)(configPath);
@@ -24311,7 +24321,7 @@ var getConfig = () => {
const configFile = (0, import_fs.readFileSync)(configPath, "utf8");
const config7 = (0, import_ini.parse)(configFile);
for (const configKey of Object.keys(config7)) {
if (!config7[configKey] || ["null", "undefined"].includes(config7[configKey])) {
if (["null", "undefined"].includes(config7[configKey])) {
config7[configKey] = void 0;
continue;
}