mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-10-18 14:13:21 +00:00
22 lines
630 B
JavaScript
22 lines
630 B
JavaScript
import { AVAILABLE_LANGUAGE_KEYS, translate } from '../src/js/translations/Translation';
|
|
|
|
console.log('hello from test');
|
|
|
|
describe('Translation', () => {
|
|
describe('AVAILABLE_LANGUAGES', () => {
|
|
it('should include English', () => {
|
|
expect(AVAILABLE_LANGUAGE_KEYS).toContain('en');
|
|
});
|
|
});
|
|
|
|
describe('translate', () => {
|
|
it('should translate language_name', () => {
|
|
localStorage.setItem('language', 'en')
|
|
expect(translate('new_user_go')).toBe('Go');
|
|
});
|
|
|
|
// TODO: update the API of Translation.js so that we can test with other
|
|
// languages (it is currently fixed to 'en')
|
|
});
|
|
});
|