hub-index-stale-banner.test.mjs
23 lines 1.0 KB
Raw
sha256:c2dbf04d56308f3bbf2d06e6d2eb022b8948b1e827195fe525a44e5e18d5f9c0 feat(auth): Phase B Connect cloud agent (RFC 8628) + Hermes… Human minor ⚠ breaking 11 days 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:93bcf8f9bd56d8c5b9339f4ec73b9ebd66571398d56262d38eedc2cfa9db9882 fix(test): align Band B landing assertion with desktop MCP … Human 11 days ago