mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-05 13:33:00 +00:00
Export constants instead of putting them on global scope
This commit is contained in:
parent
3f6be30ebc
commit
8987645725
2 changed files with 3 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
import {STRING_ERROR_MSG, STRING_DOES_NOT_EXIST_MSG} from '../helpers/content.helper';
|
||||||
import {translator} from '../../common/script/src/content/helpers';
|
import {translator} from '../../common/script/src/content/helpers';
|
||||||
|
|
||||||
describe('Translator', () => {
|
describe('Translator', () => {
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ import i18n from '../../common/script/src/i18n';
|
||||||
require('coffee-script');
|
require('coffee-script');
|
||||||
i18n.translations = require('../../website/src/i18n.js').translations;
|
i18n.translations = require('../../website/src/i18n.js').translations;
|
||||||
|
|
||||||
global.STRING_ERROR_MSG = 'Error processing the string. Please see Help > Report a Bug.';
|
export const STRING_ERROR_MSG = 'Error processing the string. Please see Help > Report a Bug.';
|
||||||
global.STRING_DOES_NOT_EXIST_MSG = /^String '.*' not found.$/;
|
export const STRING_DOES_NOT_EXIST_MSG = /^String '.*' not found.$/;
|
||||||
|
|
||||||
global.expectValidTranslationString = (attribute) => {
|
global.expectValidTranslationString = (attribute) => {
|
||||||
expect(attribute).to.be.a('function');
|
expect(attribute).to.be.a('function');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue