mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 06:07:21 +01:00
Add gear content test
This commit is contained in:
8
test/content/gear.js
Normal file
8
test/content/gear.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import armor from '../../common/script/src/content/gear/armor';
|
||||
import {each} from 'lodash';
|
||||
|
||||
let allGear = [armor];
|
||||
|
||||
describe('Gear Locales', () => {
|
||||
runTestsInDirectory('gear');
|
||||
});
|
||||
18
test/content/gear/armor.js
Normal file
18
test/content/gear/armor.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import armor from '../../../common/script/src/content/gear/armor';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('Armor', () => {
|
||||
each(armor, (set) => {
|
||||
each(set, (gear, key) => {
|
||||
describe(`${key} Armor`, () => {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(gear.text);
|
||||
});
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(gear.notes);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
18
test/content/gear/back.js
Normal file
18
test/content/gear/back.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import back from '../../../common/script/src/content/gear/back';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('Back', () => {
|
||||
each(back, (set) => {
|
||||
each(set, (gear, key) => {
|
||||
describe(`${key} Back`, () => {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(gear.text);
|
||||
});
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(gear.notes);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
18
test/content/gear/body.js
Normal file
18
test/content/gear/body.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import body from '../../../common/script/src/content/gear/body';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('Body', () => {
|
||||
each(body, (set) => {
|
||||
each(set, (gear, key) => {
|
||||
describe(`${key} Body`, () => {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(gear.text);
|
||||
});
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(gear.notes);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
18
test/content/gear/eyewear.js
Normal file
18
test/content/gear/eyewear.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import eyewear from '../../../common/script/src/content/gear/eyewear';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('Eyewear', () => {
|
||||
each(eyewear, (set) => {
|
||||
each(set, (gear, key) => {
|
||||
describe(`${key} Eyewear`, () => {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(gear.text);
|
||||
});
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(gear.notes);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
18
test/content/gear/head-accessory.js
Normal file
18
test/content/gear/head-accessory.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import headAccessory from '../../../common/script/src/content/gear/head-accessory';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('Head Accessory', () => {
|
||||
each(headAccessory, (set) => {
|
||||
each(set, (gear, key) => {
|
||||
describe(`${key} Head Accessory`, () => {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(gear.text);
|
||||
});
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(gear.notes);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
18
test/content/gear/head.js
Normal file
18
test/content/gear/head.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import head from '../../../common/script/src/content/gear/head';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('Head', () => {
|
||||
each(head, (set) => {
|
||||
each(set, (gear, key) => {
|
||||
describe(`${key} Head`, () => {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(gear.text);
|
||||
});
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(gear.notes);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
18
test/content/gear/shield.js
Normal file
18
test/content/gear/shield.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import shield from '../../../common/script/src/content/gear/shield';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('Shield', () => {
|
||||
each(shield, (set) => {
|
||||
each(set, (gear, key) => {
|
||||
describe(`${key} Shield`, () => {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(gear.text);
|
||||
});
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(gear.notes);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
18
test/content/gear/weapon.js
Normal file
18
test/content/gear/weapon.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import weapon from '../../../common/script/src/content/gear/weapon';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('Weapon', () => {
|
||||
each(weapon, (set) => {
|
||||
each(set, (gear, key) => {
|
||||
describe(`${key} Weapon`, () => {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(gear.text);
|
||||
});
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(gear.notes);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user