Fix typescript errors in tests
This commit is contained in:
@@ -6,7 +6,7 @@ describe('World Generator', () => {
|
||||
describe('generateWorld', () => {
|
||||
it('should generate a world with correct dimensions', () => {
|
||||
const runState = {
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2 },
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2, level: 1, exp: 0, expToNextLevel: 10 },
|
||||
inventory: { gold: 0, items: [] }
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('World Generator', () => {
|
||||
|
||||
it('should place player actor', () => {
|
||||
const runState = {
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2 },
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2, level: 1, exp: 0, expToNextLevel: 10 },
|
||||
inventory: { gold: 0, items: [] }
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ describe('World Generator', () => {
|
||||
|
||||
it('should create walkable rooms', () => {
|
||||
const runState = {
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2 },
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2, level: 1, exp: 0, expToNextLevel: 10 },
|
||||
inventory: { gold: 0, items: [] }
|
||||
};
|
||||
|
||||
@@ -47,7 +47,7 @@ describe('World Generator', () => {
|
||||
|
||||
it('should place exit in valid location', () => {
|
||||
const runState = {
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2 },
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2, level: 1, exp: 0, expToNextLevel: 10 },
|
||||
inventory: { gold: 0, items: [] }
|
||||
};
|
||||
|
||||
@@ -60,7 +60,7 @@ describe('World Generator', () => {
|
||||
|
||||
it('should create enemies', () => {
|
||||
const runState = {
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2 },
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2, level: 1, exp: 0, expToNextLevel: 10 },
|
||||
inventory: { gold: 0, items: [] }
|
||||
};
|
||||
|
||||
@@ -83,7 +83,7 @@ describe('World Generator', () => {
|
||||
|
||||
it('should generate deterministic maps for same level', () => {
|
||||
const runState = {
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2 },
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2, level: 1, exp: 0, expToNextLevel: 10 },
|
||||
inventory: { gold: 0, items: [] }
|
||||
};
|
||||
|
||||
@@ -101,7 +101,7 @@ describe('World Generator', () => {
|
||||
|
||||
it('should generate different maps for different levels', () => {
|
||||
const runState = {
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2 },
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2, level: 1, exp: 0, expToNextLevel: 10 },
|
||||
inventory: { gold: 0, items: [] }
|
||||
};
|
||||
|
||||
@@ -114,7 +114,7 @@ describe('World Generator', () => {
|
||||
|
||||
it('should scale enemy difficulty with level', () => {
|
||||
const runState = {
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2 },
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2, level: 1, exp: 0, expToNextLevel: 10 },
|
||||
inventory: { gold: 0, items: [] }
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ describe('Combat Simulation', () => {
|
||||
pos: { x: 3, y: 3 },
|
||||
speed: 100,
|
||||
energy: 0,
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2 }
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2, level: 1, exp: 0, expToNextLevel: 10 }
|
||||
});
|
||||
actors.set(2, {
|
||||
id: 2,
|
||||
@@ -28,7 +28,7 @@ describe('Combat Simulation', () => {
|
||||
pos: { x: 4, y: 3 },
|
||||
speed: 100,
|
||||
energy: 0,
|
||||
stats: { maxHp: 10, hp: 10, attack: 3, defense: 1 }
|
||||
stats: { maxHp: 10, hp: 10, attack: 3, defense: 1, level: 1, exp: 0, expToNextLevel: 10 }
|
||||
});
|
||||
|
||||
const world = createTestWorld(actors);
|
||||
@@ -49,7 +49,7 @@ describe('Combat Simulation', () => {
|
||||
pos: { x: 3, y: 3 },
|
||||
speed: 100,
|
||||
energy: 0,
|
||||
stats: { maxHp: 20, hp: 20, attack: 50, defense: 2 }
|
||||
stats: { maxHp: 20, hp: 20, attack: 50, defense: 2, level: 1, exp: 0, expToNextLevel: 10 }
|
||||
});
|
||||
actors.set(2, {
|
||||
id: 2,
|
||||
@@ -57,7 +57,7 @@ describe('Combat Simulation', () => {
|
||||
pos: { x: 4, y: 3 },
|
||||
speed: 100,
|
||||
energy: 0,
|
||||
stats: { maxHp: 10, hp: 10, attack: 3, defense: 1 }
|
||||
stats: { maxHp: 10, hp: 10, attack: 3, defense: 1,level: 1, exp: 0, expToNextLevel: 10 }
|
||||
});
|
||||
|
||||
const world = createTestWorld(actors);
|
||||
@@ -78,7 +78,7 @@ describe('Combat Simulation', () => {
|
||||
pos: { x: 3, y: 3 },
|
||||
speed: 100,
|
||||
energy: 0,
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2 }
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2, level: 1, exp: 0, expToNextLevel: 10 }
|
||||
});
|
||||
actors.set(2, {
|
||||
id: 2,
|
||||
@@ -86,7 +86,7 @@ describe('Combat Simulation', () => {
|
||||
pos: { x: 4, y: 3 },
|
||||
speed: 100,
|
||||
energy: 0,
|
||||
stats: { maxHp: 10, hp: 10, attack: 3, defense: 3 }
|
||||
stats: { maxHp: 10, hp: 10, attack: 3, defense: 3, level: 1, exp: 0, expToNextLevel: 10 }
|
||||
});
|
||||
|
||||
const world = createTestWorld(actors);
|
||||
@@ -109,7 +109,7 @@ describe('Combat Simulation', () => {
|
||||
pos: { x: 3, y: 3 },
|
||||
speed: 100,
|
||||
energy: 0,
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2 }
|
||||
stats: { maxHp: 20, hp: 20, attack: 5, defense: 2, level: 1, exp: 0, expToNextLevel: 10 }
|
||||
});
|
||||
|
||||
const world = createTestWorld(actors);
|
||||
|
||||
Reference in New Issue
Block a user