mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
11 lines
487 B
JavaScript
11 lines
487 B
JavaScript
import { getLanguage } from '../src/RootProvider';
|
|
|
|
describe('RootProvider.jsx', () => {
|
|
test('getLanguage returns the expected language code', () => {
|
|
expect(getLanguage({ languages: ['es-US'] })).toEqual('es');
|
|
expect(getLanguage({ languages: ['es-US'], language: 'fr-FR', userLanguage: 'en-US' })).toEqual('es');
|
|
expect(getLanguage({ language: 'fr-FR', userLanguage: 'en-US' })).toEqual('fr');
|
|
expect(getLanguage({ userLanguage: 'en-US' })).toEqual('en');
|
|
});
|
|
});
|