Files
habitica/test/helpers/content.helper.js
Matteo Pagliazzi 60f34dafb0 Deprecate API v2 (was Revert "Revert "Deprecate API v2"") (#7802)
* Revert "Revert "Deprecate API v2""

* fix path in shops controller
2016-08-01 22:36:10 +02:00

17 lines
628 B
JavaScript

require('./globals.helper');
import i18n from '../../common/script/i18n';
i18n.translations = require('../../website/server/libs/i18n').translations;
export const STRING_ERROR_MSG = 'Error processing the string. Please see Help > Report a Bug.';
export const STRING_DOES_NOT_EXIST_MSG = /^String '.*' not found.$/;
export function expectValidTranslationString (attribute) {
expect(attribute).to.be.a('function');
let translatedString = attribute();
expect(translatedString).to.not.be.empty;
expect(translatedString).to.not.eql(STRING_ERROR_MSG);
expect(translatedString).to.not.match(STRING_DOES_NOT_EXIST_MSG);
}