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:
@@ -26,9 +26,10 @@ void test('normalizeEditorLocale: trims stored en/ru', () => {
|
||||
assert.equal(normalizeEditorLocale('ru '), 'ru');
|
||||
});
|
||||
|
||||
void test('normalizeEditorLocale: blank or invalid defers to infer (explicit list)', () => {
|
||||
assert.equal(normalizeEditorLocale(''), inferEditorLocaleFromSystem([]));
|
||||
assert.equal(normalizeEditorLocale('xx'), inferEditorLocaleFromSystem([]));
|
||||
void test('normalizeEditorLocale: blank or invalid defers to system infer', () => {
|
||||
const inferred = inferEditorLocaleFromSystem();
|
||||
assert.equal(normalizeEditorLocale(''), inferred);
|
||||
assert.equal(normalizeEditorLocale('xx'), inferred);
|
||||
});
|
||||
|
||||
void test('EDITOR_MESSAGES: ru and en have the same keys', () => {
|
||||
|
||||
Reference in New Issue
Block a user