mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 01:29:21 +00:00
Add spell tests
This commit is contained in:
parent
9de2ee473d
commit
152cb99750
5 changed files with 67 additions and 0 deletions
3
test/content/spells.js
Normal file
3
test/content/spells.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
describe.only('Spells Locales', () => {
|
||||
runTestsInDirectory('spells');
|
||||
});
|
||||
16
test/content/spells/healer.js
Normal file
16
test/content/spells/healer.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import spells from '../../../common/script/src/content/spells/healer';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('Healer Spells', () => {
|
||||
each(spells, (spell, key) => {
|
||||
describe(`${key} Spell`, () => {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(spell.text);
|
||||
});
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(spell.notes);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
16
test/content/spells/rogue.js
Normal file
16
test/content/spells/rogue.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import spells from '../../../common/script/src/content/spells/rogue';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('Rogue Spells', () => {
|
||||
each(spells, (spell, key) => {
|
||||
describe(`${key} Spell`, () => {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(spell.text);
|
||||
});
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(spell.notes);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
16
test/content/spells/warrior.js
Normal file
16
test/content/spells/warrior.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import spells from '../../../common/script/src/content/spells/warrior';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('Warrior Spells', () => {
|
||||
each(spells, (spell, key) => {
|
||||
describe(`${key} Spell`, () => {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(spell.text);
|
||||
});
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(spell.notes);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
16
test/content/spells/wizard.js
Normal file
16
test/content/spells/wizard.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import spells from '../../../common/script/src/content/spells/wizard';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('Mage Spells', () => {
|
||||
each(spells, (spell, key) => {
|
||||
describe(`${key} Spell`, () => {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(spell.text);
|
||||
});
|
||||
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(spell.notes);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue