mirror of
https://github.com/github/codeql-action.git
synced 2026-01-06 14:40:10 +08:00
22 lines
621 B
TypeScript
22 lines
621 B
TypeScript
import test from "ava";
|
|
|
|
import { getRunnerLogger } from "./logging";
|
|
import { setupTests } from "./testing-utils";
|
|
import * as uploadLib from "./upload-lib";
|
|
|
|
setupTests(test);
|
|
|
|
test("validateSarifFileSchema - valid", (t) => {
|
|
const inputFile = `${__dirname}/../src/testdata/valid-sarif.sarif`;
|
|
t.notThrows(() =>
|
|
uploadLib.validateSarifFileSchema(inputFile, getRunnerLogger(true))
|
|
);
|
|
});
|
|
|
|
test("validateSarifFileSchema - invalid", (t) => {
|
|
const inputFile = `${__dirname}/../src/testdata/invalid-sarif.sarif`;
|
|
t.throws(() =>
|
|
uploadLib.validateSarifFileSchema(inputFile, getRunnerLogger(true))
|
|
);
|
|
});
|