acca846856
Memind CI / Test, build, and release guards (pull_request) Failing after 4m17s
引入批量回填与审计工具链,强制 mindspace-geo 元数据,扩展 sitemap/llms 收录 /learn,并为 Plaza 壳页注入 canonical/OG/JSON-LD;本地 593 页已通过 check:mindspace-cover。 Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
953 B
JavaScript
22 lines
953 B
JavaScript
import test from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { renderPlazaPostRedirectHtml } from './plaza-public.mjs';
|
|
|
|
test('plaza post shell embeds publication with resilient height sync', () => {
|
|
const html = renderPlazaPostRedirectHtml(
|
|
{ id: 'post-1', title: 'Tall post', summary: 'A tall publication' },
|
|
'https://go.tkmind.cn/u/john/pages/tall',
|
|
);
|
|
|
|
assert.match(html, /src="https:\/\/go\.tkmind\.cn\/u\/john\/pages\/tall\?embed=plaza"/);
|
|
assert.match(html, /function measureFrameDocument\(\)/);
|
|
assert.match(html, /body\.children\.length/);
|
|
assert.match(html, /event\.source !== frame\.contentWindow/);
|
|
assert.match(html, /sandbox="allow-scripts"/);
|
|
assert.doesNotMatch(html, /sandbox="allow-same-origin allow-scripts"/);
|
|
assert.match(html, /name="description"/);
|
|
assert.match(html, /name="mindspace-geo"/);
|
|
assert.match(html, /application\/ld\+json/);
|
|
assert.match(html, /rel="canonical"/);
|
|
});
|