mirror of
https://github.com/github/codeql-action.git
synced 2026-01-04 21:50:17 +08:00
16 lines
537 B
TypeScript
16 lines
537 B
TypeScript
import test from 'ava';
|
|
|
|
import * as uploadLib from './upload-lib';
|
|
|
|
test('validateSarifFileSchema - valid', t => {
|
|
const inputFile = __dirname + '/../src/testdata/valid-sarif.sarif';
|
|
t.true(uploadLib.validateSarifFileSchema(inputFile));
|
|
});
|
|
|
|
test('validateSarifFileSchema - invalid', t => {
|
|
const inputFile = __dirname + '/../src/testdata/invalid-sarif.sarif';
|
|
t.false(uploadLib.validateSarifFileSchema(inputFile));
|
|
// validateSarifFileSchema calls core.setFailed which sets the exit code on error
|
|
process.exitCode = 0;
|
|
});
|