Skip to content
Source
Sign inSign up

changedFileKind.test.ts

18 lines572 Bytes

1import { describe, expect, it } from "vite-plus/test";
2​
3import { classifyChangedFile } from "./changedFileKind.ts";
4​
5describe("classifyChangedFile", () => {
6 it.each([
7 ["src/contest.py", "code"],
8 ["test/fixtures/pr.json", "mocks"],
9 ["pnpm-lock.yaml", "generated"],
10 ["convex/_generated/api.d.ts", "generated"],
11 ["src/agent.eval.ts", "tests"],
12 ["evals/title-generation.ts", "tests"],
13 ["README.md", "docs"],
14 ["tests/README.md", "tests"],
15 ] as const)("%s is %s", (path, kind) => {
16 expect(classifyChangedFile(path)).toBe(kind);
17 });
18});