Files
codeql-action/src/upload-lib.test.ts
Robert Brignull 8fb9090674 fix tests
2020-05-22 17:09:41 +01:00

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;
});