diff --git a/modules/brk-client/tests/consistency.js b/modules/brk-client/tests/consistency.js index ff5fe6821..008c54376 100644 --- a/modules/brk-client/tests/consistency.js +++ b/modules/brk-client/tests/consistency.js @@ -82,7 +82,7 @@ async function testConsistency() { if (!byIndex.has(idxName)) { byIndex.set(idxName, []); } - byIndex.get(idxName).push({ path: fullPath, total }); + /** @type {Array<{path: string, total: number}>} */ (byIndex.get(idxName)).push({ path: fullPath, total }); } catch (e) { console.log( `FAIL: ${fullPath} -> ${e instanceof Error ? e.message : e}`, @@ -110,7 +110,7 @@ async function testConsistency() { const grouped = new Map(); for (const { path, total } of entries) { if (!grouped.has(total)) grouped.set(total, []); - grouped.get(total).push(path); + /** @type {string[]} */ (grouped.get(total)).push(path); } for (const [total, paths] of [...grouped].sort((a, b) => b[0] - a[0])) { @@ -123,7 +123,7 @@ async function testConsistency() { if (failed) { console.log("\nFAILED: length mismatches detected"); - process.exit(1); + throw new Error("length mismatches detected"); } else { console.log("\nPASSED: all indexes consistent"); } diff --git a/modules/brk-client/tsconfig.json b/modules/brk-client/tsconfig.json index cfe38122e..6ac44303e 100644 --- a/modules/brk-client/tsconfig.json +++ b/modules/brk-client/tsconfig.json @@ -9,5 +9,5 @@ "lib": ["DOM", "DOM.Iterable", "ESNext", "WebWorker"], "skipLibCheck": true }, - "exclude": ["dist"] + "exclude": ["dist", "tests"] }