mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
fix(tests): content coverage for wacky pots
This commit is contained in:
parent
1c82fa012d
commit
060e68ef95
2 changed files with 17 additions and 3 deletions
|
|
@ -9,13 +9,14 @@ import hatchingPotions from '../../website/common/script/content/hatching-potion
|
|||
|
||||
describe('hatchingPotions', () => {
|
||||
describe('all', () => {
|
||||
it('is a combination of drop and premium potions', () => {
|
||||
it('is a combination of drop, premium, and wacky potions', () => {
|
||||
let dropNumber = Object.keys(hatchingPotions.drops).length;
|
||||
let premiumNumber = Object.keys(hatchingPotions.premium).length;
|
||||
let wackyNumber = Object.keys(hatchingPotions.wacky).length;
|
||||
let allNumber = Object.keys(hatchingPotions.all).length;
|
||||
|
||||
expect(allNumber).to.be.greaterThan(0);
|
||||
expect(allNumber).to.equal(dropNumber + premiumNumber);
|
||||
expect(allNumber).to.equal(dropNumber + premiumNumber + wackyNumber);
|
||||
});
|
||||
|
||||
it('contains basic information about each potion', () => {
|
||||
|
|
|
|||
|
|
@ -47,6 +47,18 @@ describe('stable', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('wackyPets', () => {
|
||||
it('contains a pet for each wacky potion * each drop egg', () => {
|
||||
let numberOfWackyPotions = Object.keys(potions.wacky).length;
|
||||
let numberOfDropEggs = Object.keys(eggs.drops).length;
|
||||
let numberOfWackyPets = Object.keys(stable.wackyPets).length;
|
||||
let expectedTotal = numberOfWackyPotions * numberOfDropEggs;
|
||||
|
||||
expect(numberOfWackyPets).to.be.greaterThan(0);
|
||||
expect(numberOfWackyPets).to.equal(expectedTotal);
|
||||
});
|
||||
});
|
||||
|
||||
describe('specialPets', () => {
|
||||
it('each value is a valid translation string', () => {
|
||||
each(stable.specialPets, (pet) => {
|
||||
|
|
@ -107,10 +119,11 @@ describe('stable', () => {
|
|||
let questNumber = Object.keys(stable.questPets).length;
|
||||
let specialNumber = Object.keys(stable.specialPets).length;
|
||||
let premiumNumber = Object.keys(stable.premiumPets).length;
|
||||
let wackyNumber = Object.keys(stable.wackyPets).length;
|
||||
let allNumber = Object.keys(stable.petInfo).length;
|
||||
|
||||
expect(allNumber).to.be.greaterThan(0);
|
||||
expect(allNumber).to.equal(dropNumber + questNumber + specialNumber + premiumNumber);
|
||||
expect(allNumber).to.equal(dropNumber + questNumber + specialNumber + premiumNumber + wackyNumber);
|
||||
});
|
||||
|
||||
it('contains basic information about each pet', () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue