Files
memind/mindspace-chat-plaza.test.mjs
T
john 3318c04490 feat(chat): add one-click Plaza publish for HTML page messages.
Speed up the quick-plaza path with session snapshot reads, publish timeouts, and a modal fix so parent re-renders no longer abort in-flight requests.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 19:58:39 +08:00

12 lines
509 B
JavaScript

import test from 'node:test';
import assert from 'node:assert/strict';
import { slugFromPageTitle } from './mindspace-chat-plaza.mjs';
test('slugFromPageTitle falls back to page when title has no ascii', () => {
assert.equal(slugFromPageTitle('春江花月夜', '1c99b83b-0454-474f-a5d2-129d34506a32'), 'page-1c99b83b');
});
test('slugFromPageTitle keeps ascii slug and page suffix', () => {
assert.equal(slugFromPageTitle('Travel Guide 2026', 'abcd-1234-5678-9012'), 'travel-guide-2026-abcd1234');
});