in packages/axe-result-converter/src/axe-results-reducer.ts [68:91]
private reduceResultsWithoutNodes(url: string, accumulatedResults: AxeResultsList, currentResults: axe.Result[]): void {
if (currentResults) {
for (const currentResult of currentResults) {
if (currentResult) {
const fingerprint = this.hashGenerator.generateBase64Hash(currentResult.id);
const matchingResult = accumulatedResults.get(fingerprint);
if (matchingResult !== undefined) {
if (!matchingResult.urls.some((u) => u === url)) {
matchingResult.urls.push(url);
}
} else {
const result: AxeResult = {
...currentResult,
nodes: [],
urls: [url],
urlInfos: [], // This will get populated downstream
fingerprint,
};
accumulatedResults.add(fingerprint, result);
}
}
}
}
}