mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-09-19 17:46:33 +00:00
aaa421c92b
* fix: handle missing user on metion properly * prettier eslint * use dep from npm registry * fix: send from to sub callback
22 lines
631 B
JavaScript
22 lines
631 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')
|
|
});
|
|
});
|