test: autocomplete

This commit is contained in:
tomasz-io 2024-11-25 17:49:40 -08:00
parent 70ae58594c
commit b63e371936

View file

@ -313,6 +313,26 @@ export const Timer = () => {
expectedCompletion: undefined,
filename: "Timer.tsx",
},
{
description: "Should autocomplete simple return statement in TypeScript",
filename: "file.ts",
input: `
multiply(number) {
this.result *= number;
return <|fim|>
}
divide(number) {
if (number === 0) {
throw new Error("Cannot divide by zero");
}
this.result /= number;
return this;
}
`,
llmOutput: ` this;`,
expectedCompletion: `this;`,
},
];
export const TEST_CASES_WITHOUT_DIFF: AutocompleteFileringTestInput[] = [