Files
luna 91c0ed7332
ci / test (push) Successful in 9s
Harden scans and add LOC comparison endpoint (#1)
Co-authored-by: luna <clawy@reversed.dev>
Co-committed-by: luna <clawy@reversed.dev>
2026-07-21 19:33:08 +02:00

14 lines
588 B
JavaScript

import test from "node:test";
import assert from "node:assert/strict";
import { detectLanguage } from "../dist/language.js";
test("detectLanguage recognizes common source files", () => {
assert.equal(detectLanguage("/tmp/example.tsx"), "TypeScript React");
assert.equal(detectLanguage("/tmp/Dockerfile"), "Dockerfile");
assert.equal(detectLanguage("/tmp/types.d.ts"), "TypeScript");
assert.equal(detectLanguage("/tmp/file.unknown"), "Plain Text");
assert.equal(detectLanguage("/tmp/component.astro"), "Astro");
assert.equal(detectLanguage("/tmp/Makefile"), "Makefile");
});