mirror of
https://github.com/github/codeql-action.git
synced 2026-10-31 01:49:43 +00:00
Add a CLI interface to the upload-sarif action
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import test from 'ava';
|
||||
|
||||
import { getCLILogger } from './logging';
|
||||
import {setupTests} from './testing-utils';
|
||||
import * as uploadLib from './upload-lib';
|
||||
|
||||
@@ -7,10 +8,10 @@ setupTests(test);
|
||||
|
||||
test('validateSarifFileSchema - valid', t => {
|
||||
const inputFile = __dirname + '/../src/testdata/valid-sarif.sarif';
|
||||
t.notThrows(() => uploadLib.validateSarifFileSchema(inputFile));
|
||||
t.notThrows(() => uploadLib.validateSarifFileSchema(inputFile, getCLILogger()));
|
||||
});
|
||||
|
||||
test('validateSarifFileSchema - invalid', t => {
|
||||
const inputFile = __dirname + '/../src/testdata/invalid-sarif.sarif';
|
||||
t.throws(() => uploadLib.validateSarifFileSchema(inputFile));
|
||||
t.throws(() => uploadLib.validateSarifFileSchema(inputFile, getCLILogger()));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user