hub-index-stale-banner.test.mjs
23 lines 1.0 KB
Raw
sha256:7fe782411f3a68b39f17777b274349b30752365c13438b26bfd602c687de2c65 feat(web): rebrand Parentier family to Ourware on landing Human minor ⚠ breaking 19 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:7fe782411f3a68b39f17777b274349b30752365c13438b26bfd602c687de2c65 feat(web): rebrand Parentier family to Ourware on landing Human minor 19 days ago