fix(test): align locale normalize test with system infer path

Compare blank/invalid locale normalization against inferEditorLocaleFromSystem()
so the test passes consistently when Node exposes navigator.languages.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
     Фонтош Иван Сергеевич
2026-07-23 22:00:28 +08:00
parent eb127c11c2
commit d3b1c4660d
@@ -26,9 +26,10 @@ void test('normalizeEditorLocale: trims stored en/ru', () => {
assert.equal(normalizeEditorLocale('ru '), 'ru'); assert.equal(normalizeEditorLocale('ru '), 'ru');
}); });
void test('normalizeEditorLocale: blank or invalid defers to infer (explicit list)', () => { void test('normalizeEditorLocale: blank or invalid defers to system infer', () => {
assert.equal(normalizeEditorLocale(''), inferEditorLocaleFromSystem([])); const inferred = inferEditorLocaleFromSystem();
assert.equal(normalizeEditorLocale('xx'), inferEditorLocaleFromSystem([])); assert.equal(normalizeEditorLocale(''), inferred);
assert.equal(normalizeEditorLocale('xx'), inferred);
}); });
void test('EDITOR_MESSAGES: ru and en have the same keys', () => { void test('EDITOR_MESSAGES: ru and en have the same keys', () => {