Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gausie committed Oct 24, 2023
1 parent a6dc667 commit 2757cad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/entityTypes/familiars.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test("Can read familiars", async () => {
id: 7,
name: "Spooky Pirate Skeleton",
image: "familiar7.gif",
types: [FamiliarCategory.Combat1, FamiliarCategory.Delevel],
categories: [FamiliarCategory.Combat1, FamiliarCategory.Delevel],
larva: "spooky pirate skeleton",
equipment: "blundarrrbus",
arenaStats: {
Expand Down
2 changes: 1 addition & 1 deletion src/entityTypes/skills.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test("Can read items", async () => {
id: 3035,
name: "Bind Penne Dreadful",
image: "t_dreadful.gif",
type: SkillCategory.NoncombatNonShruggableEffect,
category: SkillCategory.NoncombatNonShruggableEffect,
mpCost: 150,
duration: 0,
level: 11,
Expand Down
8 changes: 4 additions & 4 deletions src/entityTypes/skills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export enum SkillCategory {

const isValidType = isMemberOfEnum(SkillCategory);

export type Skill = {
export type SkillType = {
id: number;
name: string;
image: string;
type: SkillCategory;
category: SkillCategory;
mpCost: number;
duration: number;
level: number;
Expand Down Expand Up @@ -166,11 +166,11 @@ export const isSkillPermable = ({ id }: { id: number }) => {
return true;
};

const parseSkill = (parts: string[]): Skill => ({
const parseSkill = (parts: string[]): SkillType => ({
id: Number(parts[0]),
name: parts[1],
image: parts[2],
type: isValidType(Number(parts[3]))
category: isValidType(Number(parts[3]))
? Number(parts[3])
: SkillCategory.Passive,
mpCost: Number(parts[4]),
Expand Down

0 comments on commit 2757cad

Please sign in to comment.