Skip to content

Commit 7d79125

Browse files
author
dlalami
committed
test(vscode-extension): count unique repos in VersionConsolidator Property 6
The generator can emit the same owner/repo more than once, which the consolidator correctly collapses into a single entry. Assert against the number of distinct repositories instead of the raw config count, fixing a seed-dependent flaky failure.
1 parent b563a35 commit 7d79125

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

apps/vscode-extension/test/services/version-consolidator.property.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,13 @@ suite('VersionConsolidator Property Tests', () => {
249249
// Consolidate
250250
const consolidated = consolidator.consolidateBundles(allBundles);
251251

252-
// Should have exactly one entry per unique repository
253-
const expectedCount = repoConfigs.length;
252+
// Should have exactly one entry per unique repository. The generator
253+
// may emit the same owner/repo more than once; those collapse into a
254+
// single consolidated entry, so count distinct repositories rather
255+
// than raw config entries.
256+
const expectedCount = new Set(
257+
repoConfigs.map((config) => `${config.owner}/${config.repo}`)
258+
).size;
254259

255260
// Verify count matches
256261
if (consolidated.length !== expectedCount) {

0 commit comments

Comments
 (0)