Update src/upload-sarif.test.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Michael B. Gale
2025-09-29 09:11:01 +01:00
committed by GitHub
parent 5fd2cfe1ef
commit 73fbfb0bbf
+4 -4
View File
@@ -132,15 +132,15 @@ const uploadSarifMacro = test.macro({
const actual = await uploadSarif(logger, features, "", testPath);
for (const analysisKind of Object.values(AnalysisKind)) {
const analyisKindResult = expectedResult[analysisKind];
if (analyisKindResult) {
const analysisKindResult = expectedResult[analysisKind];
if (analysisKindResult) {
// We are expecting a result for this analysis kind, check that we have it.
t.deepEqual(actual[analysisKind], analyisKindResult.uploadResult);
t.deepEqual(actual[analysisKind], analysisKindResult.uploadResult);
// Additionally, check that the mocked `uploadSpecifiedFiles` was called with only the file paths
// that we expected it to be called with.
t.assert(
uploadSpecifiedFiles.calledWith(
analyisKindResult.expectedFiles?.map(toFullPath) ??
analysisKindResult.expectedFiles?.map(toFullPath) ??
fullSarifPaths,
sinon.match.any,
sinon.match.any,