Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

changedFileKind.test.ts

15 lines443 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 ["README.md", "docs"],
11 ["tests/README.md", "tests"],
12 ] as const)("%s is %s", (path, kind) => {
13 expect(classifyChangedFile(path)).toBe(kind);
14 });
15});