Skip to content

Commit abbe7cb

Browse files
committed
Fix Locale tests for new Portuguese translation
1 parent a66a50f commit abbe7cb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: tests/unit/specs/components/localeswitcher/LocaleSwitcher.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('localeswitcher/LocaleSwitcher.vue', () => {
5050
it('has correct default data', () => {
5151
expect(typeof LocaleSwitcher.data).to.equal('function');
5252
expect(vm.lang).to.be.an('object');
53-
expect(Object.keys(vm.lang).length).to.eql(2);
53+
expect(Object.keys(vm.lang).length).to.eql(3);
5454
expect(vm.lang.en).to.eql('English');
5555
expect(vm.lang.de).to.eql('Deutsch');
5656
expect(vm.lang.pt).to.eql('Portugues');

Diff for: tests/unit/specs/util/Locale.spec.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const appConfig = {
77
de: 'Deutsch',
88
pt: 'Portugues'
99
},
10-
fallback: 'pt'
10+
fallback: 'de'
1111
}
1212
};
1313

@@ -29,11 +29,10 @@ describe('LocaleUtil', () => {
2929
it('getSupportedLanguages returns correct languages', () => {
3030
const supported = LocaleUtil.getSupportedLanguages(appConfig);
3131
expect(supported).to.be.an('object');
32-
expect(Object.keys(supported).length).to.eql(2);
32+
expect(Object.keys(supported).length).to.eql(3);
3333
expect(supported.en).to.eql('English');
3434
expect(supported.de).to.eql('Deutsch');
3535
expect(supported.pt).to.eql('Portugues');
36-
3736
});
3837

3938
it('getSupportedLanguages returns correct fallback language when lang is unconfigured', () => {
@@ -55,12 +54,13 @@ describe('LocaleUtil', () => {
5554

5655
it('isLanguageSupported returns correct results', () => {
5756
const enSupported = LocaleUtil.isLanguageSupported('en', appConfig);
58-
const ptSupported = LocaleUtil.isLanguageSupported('pt', appConfig);
5957
const deSupported = LocaleUtil.isLanguageSupported('de', appConfig);
6058
const frSupported = LocaleUtil.isLanguageSupported('fr', appConfig);
59+
const ptSupported = LocaleUtil.isLanguageSupported('pt', appConfig);
6160
expect(enSupported).to.be.true;
6261
expect(deSupported).to.be.true;
6362
expect(frSupported).to.be.false;
63+
expect(ptSupported).to.be.true;
6464
});
6565

6666
it('isLanguageSupported returns correct results when lang is unconfigured', () => {

0 commit comments

Comments
 (0)