Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

test(store): a store branch under test moves only the built-in rows (#1761)

Jacob Pham81ee6c286ba6
diff --git a/cli/src/dsh/store.spec.ts b/cli/src/dsh/store.spec.ts
index 1978561c3..d07069206 100644
--- a/cli/src/dsh/store.spec.ts
+++ b/cli/src/dsh/store.spec.ts
@@ -117,7 +117,12 @@ describe('the built-in shelf (store/)', () => {
try {
env.HARNESS_STORE_REF = 'viewer-packages'
resetBundledDshRegistry()
- expect(bundledDshRegistry().filter((row) => row.path).every((row) => row.ref === 'viewer-packages')).toBe(true)
+ // An outside package with a folder of its own (store/registry) keeps the ref it lists.
+ const rows = bundledDshRegistry().filter((row) => row.path)
+ const ours = rows.filter((row) => row.repo.replace(/\.git$/, '') === HARNESS_MONOREPO)
+ expect(ours.length).toBeGreaterThan(0)
+ expect(ours.every((row) => row.ref === 'viewer-packages')).toBe(true)
+ expect(rows.filter((row) => !ours.includes(row)).every((row) => row.ref !== 'viewer-packages')).toBe(true)
} finally {
env.HARNESS_STORE_REF = saved
resetBundledDshRegistry()