Add test for modified validateUniqueCategory
This commit is contained in:
parent
51891595a7
commit
af32bc6d6f
3 changed files with 15 additions and 1 deletions
4
lib/upload-lib.test.js
generated
4
lib/upload-lib.test.js
generated
|
|
@ -202,6 +202,10 @@ ava_1.default.beforeEach(() => {
|
|||
t.throws(() => uploadLib.validateUniqueCategory(sarif1));
|
||||
t.throws(() => uploadLib.validateUniqueCategory(sarif2));
|
||||
});
|
||||
(0, ava_1.default)("validateUniqueCategory with different prefixes", (t) => {
|
||||
t.notThrows(() => uploadLib.validateUniqueCategory(createMockSarif()));
|
||||
t.notThrows(() => uploadLib.validateUniqueCategory(createMockSarif(), uploadLib.CodeQualityTarget.sentinelPrefix));
|
||||
});
|
||||
(0, ava_1.default)("accept results with invalid artifactLocation.uri value", (t) => {
|
||||
const loggedMessages = [];
|
||||
const mockLogger = {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -327,6 +327,16 @@ test("validateUniqueCategory for multiple runs", (t) => {
|
|||
t.throws(() => uploadLib.validateUniqueCategory(sarif2));
|
||||
});
|
||||
|
||||
test("validateUniqueCategory with different prefixes", (t) => {
|
||||
t.notThrows(() => uploadLib.validateUniqueCategory(createMockSarif()));
|
||||
t.notThrows(() =>
|
||||
uploadLib.validateUniqueCategory(
|
||||
createMockSarif(),
|
||||
uploadLib.CodeQualityTarget.sentinelPrefix,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
test("accept results with invalid artifactLocation.uri value", (t) => {
|
||||
const loggedMessages: string[] = [];
|
||||
const mockLogger = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue