update tests and remove debugger

This commit is contained in:
Patrick Erichsen 2025-07-02 16:06:18 -07:00
parent aaaa44f0c0
commit 15bbf19f2d
3 changed files with 4 additions and 2 deletions

View file

@ -36,6 +36,7 @@ test("createRuleBlockImpl should create a rule with glob pattern", async () => {
const { frontmatter, markdown } = parseMarkdownRule(fileContent);
expect(frontmatter).toEqual({
alwaysApply: true,
description: "Always use interfaces",
globs: "**/*.{ts,tsx}",
});
@ -72,6 +73,7 @@ test("createRuleBlockImpl should create a rule with description pattern", async
const { frontmatter, markdown } = parseMarkdownRule(fileContent);
expect(frontmatter).toEqual({
alwaysApply: true,
description: "This is a detailed explanation of the rule",
});
@ -94,6 +96,7 @@ test("createRuleBlockImpl should include both globs and description in frontmatt
const { frontmatter, markdown } = parseMarkdownRule(fileContent);
expect(frontmatter).toEqual({
alwaysApply: false,
description: "This rule enforces our team standards",
globs: "**/*.js",
});
@ -116,6 +119,7 @@ test("createRuleBlockImpl should create a rule with alwaysApply set to false", a
const { frontmatter } = parseMarkdownRule(fileContent);
expect(frontmatter).toEqual({
alwaysApply: false,
description: "Optional rule",
});
});

View file

@ -92,7 +92,6 @@ export function GenerationScreen({
}
try {
debugger;
const options: any = {
alwaysApply: formData.alwaysApply,
};

View file

@ -82,7 +82,6 @@ export function useRuleGeneration(
setCreateRuleBlockArgs(null);
try {
debugger;
// Convert current history to ChatMessage format
const chatMessages: ChatMessage[] = currentHistory.map(
(item) => item.message,