fix test lint

This commit is contained in:
Matteo Pagliazzi
2019-10-08 20:45:38 +02:00
parent e37f4467f8
commit 85fb5f33aa
367 changed files with 6635 additions and 6080 deletions

View File

@@ -1,4 +1,5 @@
import i18n from '../../website/common/script/i18n';
i18n.translations = require('../../website/server/libs/i18n').translations;
const STRING_ERROR_MSG = 'Error processing the string. Please see Help > Report a Bug.';
@@ -8,7 +9,7 @@ const STRING_DOES_NOT_EXIST_MSG = /^String '.*' not found.$/;
// That way, if the translated string changes, the test
// will not break. NOTE: it checks against errors with string as well.
export function translate (key, variables, language) {
let translatedString = i18n.t(key, variables, language);
const translatedString = i18n.t(key, variables, language);
expect(translatedString).to.not.be.empty;
expect(translatedString).to.not.eql(STRING_ERROR_MSG);