Just check the number of locations

Only tests the property we are looking for and avoids problems with
different cross-platform behavior.
This commit is contained in:
Henry Mercer 2023-03-24 21:50:26 +00:00
parent c8935d5a9d
commit 329c022f48
2 changed files with 0 additions and 8 deletions

View file

@ -95,10 +95,6 @@ jobs:
if (n.locations.length !== 1) {
core.setFailed(`Expected the status page diagnostic to have exactly 1 location, but found ${n.locations.length}.`);
}
const actualUri = n.locations[0].physicalLocation?.artifactLocation?.uri
if (actualUri !== '/path/to/file') {
core.setFailed(`Expected the status page diagnostic to have a location with the URI '/path/to/file', but found '${actualUri}'.`);
}
}
const sarif = JSON.parse(fs.readFileSync(process.env['SARIF_PATH'], 'utf8'));