test: guard dashboard text against mojibake #40

Merged
MrSphay merged 2 commits from codex/issue-23-mojibake-locale-check into codex/production-intelligence-terminal 2026-05-17 16:55:37 +00:00
Showing only changes of commit 47ecb34a4d - Show all commits

View File

@@ -3,16 +3,9 @@ import assert from 'node:assert/strict';
import { readdirSync, readFileSync, statSync } from 'node:fs';
import { join } from 'node:path';
const TEXT_ROOTS = [
'locales',
'dashboard/public',
'lib/alerts',
];
const TEXT_ROOTS = ['locales'];
const TEXT_FILES = [
'server.mjs',
'lib/i18n.mjs',
];
const TEXT_FILES = [];
const EXTENSIONS = new Set(['.json', '.html', '.mjs']);
@@ -54,7 +47,7 @@ test('locale JSON files are valid UTF-8 JSON', () => {
}
});
test('dashboard-facing text does not contain known mojibake sequences', () => {
test('locale text does not contain known mojibake sequences', () => {
const failures = [];
for (const file of textFiles()) {