mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-04 01:29:21 +00:00
Create user default test
This commit is contained in:
parent
61589ca262
commit
26d73d0bc1
1 changed files with 30 additions and 0 deletions
30
test/content/user-defaults.js
Normal file
30
test/content/user-defaults.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import userDefaults from '../../common/script/src/content/user-defaults';
|
||||
import {each} from 'lodash';
|
||||
|
||||
describe('User Default Locales', () => {
|
||||
each(userDefaults, (types, key) => {
|
||||
describe(`${key}`, () => {
|
||||
each(types, (type, index) => {
|
||||
describe(`${key}[${index}]`, () => {
|
||||
if (type.text) {
|
||||
it('has a valid text attribute', () => {
|
||||
expectValidTranslationString(type.text);
|
||||
});
|
||||
}
|
||||
|
||||
if (type.name) {
|
||||
it('has a valid name attribute', () => {
|
||||
expectValidTranslationString(type.name);
|
||||
});
|
||||
}
|
||||
|
||||
if (type.notes) {
|
||||
it('has a valid notes attribute', () => {
|
||||
expectValidTranslationString(type.notes);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue