mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-10-09 15:58:34 +00:00
3c393380e5
* feat(settings): support local CJK fonts * refactor: move CJK font rules to domain * fix(settings): improve CJK font preview safety * fix(settings): refresh local font previews * fix(settings): improve font picker keyboard behavior * fix(settings): handle unavailable font detection * fix(settings): cover font picker edge cases * fix(settings): quote custom font families safely
20 lines
488 B
TypeScript
20 lines
488 B
TypeScript
import { readFileSync } from 'node:fs';
|
|
import assert from 'node:assert/strict';
|
|
import test from 'node:test';
|
|
|
|
const source = readFileSync(
|
|
new URL('./TerminalCjkFontSelect.tsx', import.meta.url),
|
|
'utf8',
|
|
);
|
|
|
|
test('font warnings follow the value currently shown in the preview', () => {
|
|
assert.match(
|
|
source,
|
|
/getTerminalCjkFontSelectionStatus\(\s*previewSelection,/,
|
|
);
|
|
assert.match(
|
|
source,
|
|
/previewSelection && isFontInstalled\(previewSelection\)/,
|
|
);
|
|
});
|