Files
codeql-action/src/sarif/index.test.ts
T
Michael B. Gale b43d146e37 Do not alias types
2026-03-02 20:47:19 +00:00

19 lines
435 B
TypeScript

import * as fs from "fs";
import test from "ava";
import { setupTests } from "../testing-utils";
import { getToolNames, type Log } from ".";
setupTests(test);
test("getToolNames", (t) => {
const input = fs.readFileSync(
`${__dirname}/../../src/testdata/tool-names.sarif`,
"utf8",
);
const toolNames = getToolNames(JSON.parse(input) as Log);
t.deepEqual(toolNames, ["CodeQL command-line toolchain", "ESLint"]);
});