Elffuss BraidHub

kikocis/continue public

main · 758 BRawPermalink
1import { describe, expect, it } from "vitest";
2import { createRuleFilePath } from "./utils";
3
4describe("createRuleFilePath", () => {
5 it("should create correct rule file path", () => {
6 const result = createRuleFilePath("/workspace", "My Test Rule");
7 expect(result).toBe("/workspace/.continue/rules/my-test-rule.md");
8 });
9
10 it("should handle special characters in rule name", () => {
11 const result = createRuleFilePath("/home/user", "Rule with @#$% chars");
12 expect(result).toBe("/home/user/.continue/rules/rule-with-chars.md");
13 });
14
15 it("should handle edge case rule names", () => {
16 const result = createRuleFilePath("/test", " Multiple Spaces ");
17 expect(result).toBe("/test/.continue/rules/multiple-spaces.md");
18 });
19});