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,23 +1,20 @@
import {
expectValidTranslationString
expectValidTranslationString,
describeEachItem
} from '../helpers/content.helper';
import backgroundSets from '../../common/script/src/content/backgrounds';
import {each} from 'lodash';
describe('Backgrounds Locales', () => {
each(backgroundSets, (set, key) => {
describe(`${key} Set`, () => {
each(set, (bg, name) => {
describe(`${name} Background`, () => {
it('has a valid text attribute', () => {
expectValidTranslationString(bg.text);
});
import backgroundSets from '../../common/script/src/content/backgrounds';
it('has a valid notes attribute', () => {
expectValidTranslationString(bg.notes);
});
});
describe('Backgrounds', () => {
each(backgroundSets, (set, name) => {
describeEachItem(name, set, (bg, key) => {
it('has a valid text attribute', () => {
expectValidTranslationString(bg.text);
});
it('has a valid notes attribute', () => {
expectValidTranslationString(bg.notes);
});
});
});