Skip to content

Commit 467d5b2

Browse files
Copilotmgifford
andcommitted
Fix CodeQL false positives in accessibility statement tests
Co-authored-by: mgifford <116832+mgifford@users.noreply.github.com> Agent-Logs-Url: https://github.com/mgifford/daily-dap/sessions/a17faf0b-84b1-4938-b6b9-062ae933029b
1 parent c8d08f5 commit 467d5b2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/unit/accessibility-statement-checker.test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,11 @@ test('checkAccessibilityStatements deduplicates domains', async () => {
124124
}
125125
});
126126
assert.equal(checked.length, 2, 'Should check each unique hostname once');
127-
assert.ok(checked.includes('https://example.gov'));
128-
assert.ok(checked.includes('https://other.gov'));
127+
assert.deepEqual(
128+
checked.slice().sort(),
129+
['https://example.gov', 'https://other.gov'].sort(),
130+
'Should check exactly the two unique domains'
131+
);
129132
});
130133

131134
test('checkAccessibilityStatements returns results keyed by hostname', async () => {

0 commit comments

Comments
 (0)