From d5ecbfc5391c114a702fc669acd972841fc1d611 Mon Sep 17 00:00:00 2001 From: Aleksei Kuzmin Date: Wed, 14 Mar 2018 11:20:41 +0900 Subject: [PATCH] spec: Do not assume en-US locale to be the current --- spec/chromium-spec.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index 3f78c5c533c4..1f5b8c99fa79 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -29,6 +29,7 @@ describe('chromium feature', () => { describe('command line switches', () => { describe('--lang switch', () => { + const currentLocale = app.getLocale() const testLocale = (locale, result, done) => { const appPath = path.join(__dirname, 'fixtures', 'api', 'locale-check') const electronPath = remote.getGlobal('process').execPath @@ -44,7 +45,7 @@ describe('chromium feature', () => { } it('should set the locale', (done) => testLocale('fr', 'fr', done)) - it('should not set an invalid locale', (done) => testLocale('asdfkl', 'en-US', done)) + it('should not set an invalid locale', (done) => testLocale('asdfkl', currentLocale, done)) }) })