From 64eace3b901435e8e5687c365c967d7c929bce73 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Thu, 31 Oct 2019 14:58:45 -0400 Subject: [PATCH] Add test for localized spoken language name --- test/unit/extension_text_to_speech.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/unit/extension_text_to_speech.js b/test/unit/extension_text_to_speech.js index 668f8101a..a6fd9dbfa 100644 --- a/test/unit/extension_text_to_speech.js +++ b/test/unit/extension_text_to_speech.js @@ -34,3 +34,11 @@ test('get the extension locale for a supported locale that differs', t => { t.strictEqual(ext.getCurrentLanguage(), 'ja'); t.end(); }); + +test('use localized spoken language name in place of localized written language name', t => { + ext.getEditorLanguage = () => 'es'; + const languageMenu = ext.getLanguageMenu(); + const localizedNameForChineseInSpanish = languageMenu.find(el => el.value === 'zh-cn').text; + t.strictEqual(localizedNameForChineseInSpanish, 'Chino (MandarĂ­n)'); // i.e. should not be 'Chino (simplificado)' + t.end(); +});