fix test lint

This commit is contained in:
Matteo Pagliazzi
2019-10-08 20:45:38 +02:00
parent e37f4467f8
commit 85fb5f33aa
367 changed files with 6635 additions and 6080 deletions

View File

@@ -10,13 +10,13 @@ import * as stable from '../../website/common/script/content/stable';
import * as eggs from '../../website/common/script/content/eggs';
import * as potions from '../../website/common/script/content/hatching-potions';
describe('stable', () => {
describe('stable', () => {
describe('dropPets', () => {
it('contains a pet for each drop potion * each drop egg', () => {
let numberOfDropPotions = Object.keys(potions.drops).length;
let numberOfDropEggs = Object.keys(eggs.drops).length;
let numberOfDropPets = Object.keys(stable.dropPets).length;
let expectedTotal = numberOfDropPotions * numberOfDropEggs;
const numberOfDropPotions = Object.keys(potions.drops).length;
const numberOfDropEggs = Object.keys(eggs.drops).length;
const numberOfDropPets = Object.keys(stable.dropPets).length;
const expectedTotal = numberOfDropPotions * numberOfDropEggs;
expect(numberOfDropPets).to.be.greaterThan(0);
expect(numberOfDropPets).to.equal(expectedTotal);
@@ -25,10 +25,10 @@ describe('stable', () => {
describe('questPets', () => {
it('contains a pet for each drop potion * each quest egg', () => {
let numberOfDropPotions = Object.keys(potions.drops).length;
let numberOfQuestEggs = Object.keys(eggs.quests).length;
let numberOfQuestPets = Object.keys(stable.questPets).length;
let expectedTotal = numberOfDropPotions * numberOfQuestEggs;
const numberOfDropPotions = Object.keys(potions.drops).length;
const numberOfQuestEggs = Object.keys(eggs.quests).length;
const numberOfQuestPets = Object.keys(stable.questPets).length;
const expectedTotal = numberOfDropPotions * numberOfQuestEggs;
expect(numberOfQuestPets).to.be.greaterThan(0);
expect(numberOfQuestPets).to.equal(expectedTotal);
@@ -37,10 +37,10 @@ describe('stable', () => {
describe('premiumPets', () => {
it('contains a pet for each premium potion * each drop egg', () => {
let numberOfPremiumPotions = Object.keys(potions.premium).length;
let numberOfDropEggs = Object.keys(eggs.drops).length;
let numberOfPremiumPets = Object.keys(stable.premiumPets).length;
let expectedTotal = numberOfPremiumPotions * numberOfDropEggs;
const numberOfPremiumPotions = Object.keys(potions.premium).length;
const numberOfDropEggs = Object.keys(eggs.drops).length;
const numberOfPremiumPets = Object.keys(stable.premiumPets).length;
const expectedTotal = numberOfPremiumPotions * numberOfDropEggs;
expect(numberOfPremiumPets).to.be.greaterThan(0);
expect(numberOfPremiumPets).to.equal(expectedTotal);
@@ -49,10 +49,10 @@ 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;
const numberOfWackyPotions = Object.keys(potions.wacky).length;
const numberOfDropEggs = Object.keys(eggs.drops).length;
const numberOfWackyPets = Object.keys(stable.wackyPets).length;
const expectedTotal = numberOfWackyPotions * numberOfDropEggs;
expect(numberOfWackyPets).to.be.greaterThan(0);
expect(numberOfWackyPets).to.equal(expectedTotal);
@@ -61,8 +61,8 @@ describe('stable', () => {
describe('specialPets', () => {
it('each value is a valid translation string', () => {
each(stable.specialPets, (pet) => {
let string = t(pet);
each(stable.specialPets, pet => {
const string = t(pet);
expectValidTranslationString(string);
});
});
@@ -70,10 +70,10 @@ describe('stable', () => {
describe('dropMounts', () => {
it('contains a mount for each drop potion * each drop egg', () => {
let numberOfDropPotions = Object.keys(potions.drops).length;
let numberOfDropEggs = Object.keys(eggs.drops).length;
let numberOfDropMounts = Object.keys(stable.dropMounts).length;
let expectedTotal = numberOfDropPotions * numberOfDropEggs;
const numberOfDropPotions = Object.keys(potions.drops).length;
const numberOfDropEggs = Object.keys(eggs.drops).length;
const numberOfDropMounts = Object.keys(stable.dropMounts).length;
const expectedTotal = numberOfDropPotions * numberOfDropEggs;
expect(numberOfDropMounts).to.be.greaterThan(0);
expect(numberOfDropMounts).to.equal(expectedTotal);
@@ -82,10 +82,10 @@ describe('stable', () => {
describe('questMounts', () => {
it('contains a mount for each drop potion * each quest egg', () => {
let numberOfDropPotions = Object.keys(potions.drops).length;
let numberOfQuestEggs = Object.keys(eggs.quests).length;
let numberOfQuestMounts = Object.keys(stable.questMounts).length;
let expectedTotal = numberOfDropPotions * numberOfQuestEggs;
const numberOfDropPotions = Object.keys(potions.drops).length;
const numberOfQuestEggs = Object.keys(eggs.quests).length;
const numberOfQuestMounts = Object.keys(stable.questMounts).length;
const expectedTotal = numberOfDropPotions * numberOfQuestEggs;
expect(numberOfQuestMounts).to.be.greaterThan(0);
expect(numberOfQuestMounts).to.equal(expectedTotal);
@@ -94,10 +94,10 @@ describe('stable', () => {
describe('premiumMounts', () => {
it('contains a mount for each premium potion * each drop egg', () => {
let numberOfPremiumPotions = Object.keys(potions.premium).length;
let numberOfDropEggs = Object.keys(eggs.drops).length;
let numberOfPremiumMounts = Object.keys(stable.premiumMounts).length;
let expectedTotal = numberOfPremiumPotions * numberOfDropEggs;
const numberOfPremiumPotions = Object.keys(potions.premium).length;
const numberOfDropEggs = Object.keys(eggs.drops).length;
const numberOfPremiumMounts = Object.keys(stable.premiumMounts).length;
const expectedTotal = numberOfPremiumPotions * numberOfDropEggs;
expect(numberOfPremiumMounts).to.be.greaterThan(0);
expect(numberOfPremiumMounts).to.equal(expectedTotal);
@@ -106,24 +106,26 @@ describe('stable', () => {
describe('specialMounts', () => {
it('each value is a valid translation string', () => {
each(stable.specialMounts, (mount) => {
let string = t(mount);
each(stable.specialMounts, mount => {
const string = t(mount);
expectValidTranslationString(string);
});
});
});
describe('petInfo', () => {
describe('petInfo', () => {
it('contains an entry for all pets', () => {
let dropNumber = Object.keys(stable.dropPets).length;
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;
const dropNumber = Object.keys(stable.dropPets).length;
const questNumber = Object.keys(stable.questPets).length;
const specialNumber = Object.keys(stable.specialPets).length;
const premiumNumber = Object.keys(stable.premiumPets).length;
const wackyNumber = Object.keys(stable.wackyPets).length;
const allNumber = Object.keys(stable.petInfo).length;
expect(allNumber).to.be.greaterThan(0);
expect(allNumber).to.equal(dropNumber + questNumber + specialNumber + premiumNumber + wackyNumber);
expect(allNumber).to.equal(
dropNumber + questNumber + specialNumber + premiumNumber + wackyNumber,
);
});
it('contains basic information about each pet', () => {
@@ -135,13 +137,13 @@ describe('stable', () => {
});
});
describe('mountInfo', () => {
describe('mountInfo', () => {
it('contains an entry for all mounts', () => {
let dropNumber = Object.keys(stable.dropMounts).length;
let questNumber = Object.keys(stable.questMounts).length;
let specialNumber = Object.keys(stable.specialMounts).length;
let premiumNumber = Object.keys(stable.premiumMounts).length;
let allNumber = Object.keys(stable.mountInfo).length;
const dropNumber = Object.keys(stable.dropMounts).length;
const questNumber = Object.keys(stable.questMounts).length;
const specialNumber = Object.keys(stable.specialMounts).length;
const premiumNumber = Object.keys(stable.premiumMounts).length;
const allNumber = Object.keys(stable.mountInfo).length;
expect(allNumber).to.be.greaterThan(0);
expect(allNumber).to.equal(dropNumber + questNumber + specialNumber + premiumNumber);