Initial commit: Memind H5 portal with MindSpace, Plaza, and agent jobs.
Track application source and tests; exclude local env, user workspaces, and runtime data via .gitignore. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import { localizeGoogleFontsCss } from './mindspace-html-localize.mjs';
|
||||
|
||||
test('localizeGoogleFontsCss inlines google fonts imports', async () => {
|
||||
const source = `<!doctype html><html><head><style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC&display=swap');
|
||||
body { color: red; }
|
||||
</style></head><body>Hi</body></html>`;
|
||||
|
||||
const result = await localizeGoogleFontsCss(source);
|
||||
assert.equal(result.localizedCount, 1);
|
||||
assert.match(result.html, /data-mindspace-local="google-fonts"/);
|
||||
assert.doesNotMatch(result.html, /@import\s+url\(['"]?https:\/\/fonts\.googleapis\.com/);
|
||||
});
|
||||
Reference in New Issue
Block a user