Simplify background tests

This commit is contained in:
Blade Barringer
2015-10-03 11:54:58 -05:00
parent cc579b97a3
commit 62b15c4f48

View File

@@ -1,15 +1,14 @@
import { import {
expectValidTranslationString expectValidTranslationString,
describeEachItem
} from '../helpers/content.helper'; } from '../helpers/content.helper';
import backgroundSets from '../../common/script/src/content/backgrounds';
import {each} from 'lodash'; import {each} from 'lodash';
describe('Backgrounds Locales', () => { import backgroundSets from '../../common/script/src/content/backgrounds';
each(backgroundSets, (set, key) => {
describe(`${key} Set`, () => { describe('Backgrounds', () => {
each(set, (bg, name) => { each(backgroundSets, (set, name) => {
describe(`${name} Background`, () => { describeEachItem(name, set, (bg, key) => {
it('has a valid text attribute', () => { it('has a valid text attribute', () => {
expectValidTranslationString(bg.text); expectValidTranslationString(bg.text);
}); });
@@ -19,7 +18,5 @@ describe('Backgrounds Locales', () => {
}); });
}); });
}); });
});
});
}); });