update tests

This commit is contained in:
peter
2020-02-06 15:42:56 +01:00
parent b01a06fa10
commit b987974b9e
34 changed files with 339 additions and 26 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
import { T1 } from "../../Types/Items";
import { T1, T2 } from "../../Types/Items";
import { Inject, Injectable } from "../../Injector/ServiceDecorator";
import { ItemManagerFeatureIfc, ItemManagerIfc } from "./RPCInterface";
import { FrontworkComponent } from "../../Types/FrontworkComponent";
@@ -9,7 +9,6 @@ import { IItemManager } from "./Interface";
import { getLogger } from "log4js";
import { IUserManager } from "../User/Interface";
import { ICharacterManager } from "../Character/Interface";
import { join } from "path";
const fetch = require('node-fetch')
const xml2js = require('xml2js');
@@ -250,10 +249,11 @@ implements FrontworkComponent<ItemManagerIfc, ItemManagerFeatureIfc>, TableDefin
if(this.initialized) return
this.initialized = true
const allItems = [...T1]
getLogger('ItemManager').debug('Checking items')
const allItems = [...T1, ...T2]
const countCache = await this.countItems()
getLogger('ItemManager').debug('Checking items, got: ',countCache, 'expected: ', allItems.length)
if(countCache != allItems.length){
const items:Item[] = await Promise.all(allItems.map((i) => this.fetchItem(i)))
try{
+72 -1
View File
@@ -61,4 +61,75 @@ export const T1 = [
"Ring of Binding",
"Shard of the Scale",
"Head of Onyxia",
"Bindings of the Windseeker"]
"Bindings of the Windseeker"]
export const T2:string[] = [
"Gloves of Rapid Evolution",
"Mantle of the Blackwing Cabal",
"Spineshatter",
"The Untamed Blade",
"Pendant of the Fallen Dragon",
"Helm of Endless Rage",
"Dragonfang Blade",
"Red Dragonscale Protector",
"Black Brood Pauldrons",
"Bracers of Arcane Accuracy",
"Heartstriker",
"Maladath, Runed Blade of the Black Flight",
"Black Ash Robe",
"Firemaw's Clutch",
"Claw of the Black Drake",
"Cloak of Firemaw",
"Legguards of the Fallen Crusader",
"Taut Dragonhide Belt",
"Drake Talon Pauldrons",
"Rejuvenating Gem",
"Drake Talon Cleaver",
"Band of Forced Concentration",
"Drake Fang Talisman",
"Ebony Flame Gloves",
"Malfurion's Blessed Bulwark",
"Dragonbreath Hand Cannon",
"Shadow Wing Focus Staff",
"Shroud of Pure Thought",
"Circle of Applied Force",
"Emberweave Leggings",
"Styleen's Impeding Scarab",
"Dragon's Touch",
"Herald of Woe",
"Taut Dragonhide Shoulderpads",
"Chromatic Boots",
"Taut Dragonhide Gloves",
"Shimmering Geta",
"Elementium Threaded Cloak",
"Angelista's Grasp",
"Girdle of the Fallen Crusader",
"Empowered Leggings",
"Chromatically Tempered Sword",
"Claw of Chromaggus",
"Primalist's Linked Waistguard",
"Ashjre'thul, Crossbow of Smiting",
"Elementium Reinforced Bulwark",
"Head of Nefarian",
"Cloak of the Brood Lord",
"Boots of the Shadow Flame",
"Therazane's Link",
"Archimtiros' Ring of Reckoning",
"Neltharion's Tear",
"Pure Elementium Band",
"Mish'undare, Circlet of the Mind Flayer",
"Prestor's Talisman of Connivery",
"Staff of the Shadow Flame",
"Ashkandi, Greatsword of the Brotherhood",
"Crul'shorukh, Edge of Chaos",
"Lok'amir il Romathis",
"Boots of Pure Thought",
"Cloak of Draconic Might",
"Draconic Maul",
"Doom's Edge",
"Essence Gatherer",
"Band of Dark Dominion",
"Draconic Avenger",
"Interlaced Shadow Jerkin",
"Ringo's Blizzard Boots"
]
+2 -2
View File
@@ -2,7 +2,7 @@ import { Spec, _Class, Class } from "./Types"
export type SpecT = {
Warrior : 'Arms' | 'Fury' | 'Protection'
Rogue: 'Subetly' | 'Combat' | 'Assassination'
Rogue: 'Subtlety' | 'Combat' | 'Assassination'
Hunter: 'Beast Mastery' | 'Marksmanship' | 'Survival'
Paladin: 'Holy' | 'Protection' | 'Retribution'
Priest: 'Discipline' | 'Holy' | 'Shadow'
@@ -20,7 +20,7 @@ export const specs : { [classname in keyof SpecT] : SpecT[classname][] } = {
],
Rogue: [
'Subetly',
'Subtlety',
'Combat',
'Assassination'
],