Ignore generic metadata files in counts
ci / test (push) Successful in 9s

This commit is contained in:
2026-07-16 20:36:06 +00:00
parent 0ccd4e47ae
commit ecc1578b92
4 changed files with 81 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import test from "node:test";
import assert from "node:assert/strict";
import { shouldIgnoreCountFile } from "../dist/file-filter.js";
test("shouldIgnoreCountFile skips generic project metadata files", () => {
assert.equal(shouldIgnoreCountFile("/tmp/package.json"), true);
assert.equal(shouldIgnoreCountFile("/tmp/tsconfig.json"), true);
assert.equal(shouldIgnoreCountFile("/tmp/docker-compose.yml"), true);
assert.equal(shouldIgnoreCountFile("/tmp/src/index.ts"), false);
assert.equal(shouldIgnoreCountFile("/tmp/README.md"), false);
});