hub-index-stale-banner.test.mjs
sha256:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d
docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge
Human
12 hours ago
| 1 | /** |
| 2 | * Contract: Hub shows a client-side hint when vault edits may have outpaced Meaning (semantic) search until Re-index. |
| 3 | */ |
| 4 | import { readFileSync } from 'node:fs'; |
| 5 | import { fileURLToPath } from 'node:url'; |
| 6 | import { dirname, join } from 'node:path'; |
| 7 | import test from 'node:test'; |
| 8 | import assert from 'node:assert/strict'; |
| 9 | |
| 10 | const root = join(dirname(fileURLToPath(import.meta.url)), '..'); |
| 11 | const hubJs = readFileSync(join(root, 'web/hub/hub.js'), 'utf8'); |
| 12 | const hubHtml = readFileSync(join(root, 'web/hub/index.html'), 'utf8'); |
| 13 | |
| 14 | test('Hub index-stale banner: markup + JS wiring', () => { |
| 15 | assert.match(hubHtml, /id="hub-index-stale-banner"/); |
| 16 | assert.match(hubHtml, /id="hub-index-stale-run"/); |
| 17 | assert.match(hubHtml, /id="hub-index-stale-dismiss"/); |
| 18 | assert.match(hubJs, /HUB_SEMANTIC_INDEX_STALE_PREFIX/); |
| 19 | assert.match(hubJs, /function hubMarkSemanticIndexStale\b/); |
| 20 | assert.match(hubJs, /function hubClearSemanticIndexStale\b/); |
| 21 | assert.match(hubJs, /function hubRefreshIndexStaleBanner\b/); |
| 22 | assert.match(hubJs, /hubClearSemanticIndexStale\(\)/); |
| 23 | }); |
File History
1 commit
sha256:8915fe406161f95c1681f9469375e7bae5b28c884f00bedbdef65e4b0cd0738d
docs(flow): commit FLOW-V0-SPEC.md hygiene for 7A-INT merge
Human
12 hours ago