mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-29 06:07:32 +00:00
14 lines
526 B
JavaScript
14 lines
526 B
JavaScript
|
|
import {translator} from '../../common/script/src/content/helpers';
|
||
|
|
|
||
|
|
describe('Translator', () => {
|
||
|
|
it('returns error message if string is not properly formatted', () => {
|
||
|
|
let improperlyFormattedString = translator('petName', {attr: 0})();
|
||
|
|
expect(improperlyFormattedString).to.eql(STRING_ERROR_MSG);
|
||
|
|
});
|
||
|
|
|
||
|
|
it('returns an error message if string does not exist', () => {
|
||
|
|
let stringDoesNotExist = translator('stringDoesNotExist')();
|
||
|
|
expect(stringDoesNotExist).to.match(STRING_DOES_NOT_EXIST_MSG);
|
||
|
|
});
|
||
|
|
});
|