Convert other globals to exported functions

This commit is contained in:
Blade Barringer
2015-10-03 10:48:42 -05:00
parent f9ee70e912
commit 4b46a0e9fc
12 changed files with 52 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ i18n.translations = require('../../website/src/i18n.js').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.$/;
global.expectValidTranslationString = (attribute) => {
export function expectValidTranslationString (attribute) {
expect(attribute).to.be.a('function');
let translatedString = attribute();
@@ -18,7 +18,7 @@ global.expectValidTranslationString = (attribute) => {
expect(translatedString).to.not.match(STRING_DOES_NOT_EXIST_MSG);
};
global.describeEachItem = (testDescription, set, cb, describeFunction) => {
export function describeEachItem (testDescription, set, cb, describeFunction) {
// describeFunction allows you to pass in 'only' or 'skip'
// as the last argument for writing/debugging tests.
// This should only be used with the helper functions .only and .skip below