Add a CLI interface to the upload-sarif action
This commit is contained in:
parent
bcf676e52d
commit
6d7a135fea
15 changed files with 355 additions and 89 deletions
|
|
@ -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()));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue