fix: update tests

This commit is contained in:
hyper 2026-04-16 18:33:13 +08:00
parent 8c783da857
commit 51da1e5308
3 changed files with 9 additions and 9 deletions

View File

@ -220,19 +220,19 @@ describe('combat/effects', () => {
}); });
it('should decrement lingering buffs', () => { it('should decrement lingering buffs', () => {
const buffs: Record<string, number> = { spike: 3, aim: 1 }; const buffs: Record<string, number> = { curse: 3, energyDrain: 1 };
updateBuffs(buffs); updateBuffs(buffs);
expect(buffs['spike']).toBe(2); expect(buffs['curse']).toBe(2);
expect(buffs['aim']).toBeUndefined(); expect(buffs['energyDrain']).toBeUndefined();
}); });
it('should not affect permanent or posture buffs', () => { it('should not affect permanent or posture buffs', () => {
const buffs: Record<string, number> = { defend: 5, energyDrain: 1 }; const buffs: Record<string, number> = { defend: 5, spike: 1 };
updateBuffs(buffs); updateBuffs(buffs);
expect(buffs['defend']).toBe(5); expect(buffs['defend']).toBe(5);
expect(buffs['energyDrain']).toBe(1); expect(buffs['spike']).toBe(1);
}); });
}); });

View File

@ -285,8 +285,8 @@ describe('combat/state', () => {
it('should return timing for known effects', () => { it('should return timing for known effects', () => {
expect(getEffectTiming('attack')).toBe('instant'); expect(getEffectTiming('attack')).toBe('instant');
expect(getEffectTiming('defend')).toBe('posture'); expect(getEffectTiming('defend')).toBe('posture');
expect(getEffectTiming('spike')).toBe('lingering'); expect(getEffectTiming('spike')).toBe('permanent');
expect(getEffectTiming('energyDrain')).toBe('permanent'); expect(getEffectTiming('energyDrain')).toBe('lingering');
}); });
it('should return undefined for unknown effects', () => { it('should return undefined for unknown effects', () => {

View File

@ -148,7 +148,7 @@ describe('effectDesert.csv import', () => {
}); });
it('should have expected number of effects', () => { it('should have expected number of effects', () => {
expect(effectDesertData.length).toBe(34); expect(effectDesertData.length).toBe(35);
}); });
it('should have correct fields for each effect', () => { it('should have correct fields for each effect', () => {
@ -267,7 +267,7 @@ describe('statusCardDesert.csv import', () => {
}); });
it('should have expected number of status cards', () => { it('should have expected number of status cards', () => {
expect(statusCardDesertData.length).toBe(4); expect(statusCardDesertData.length).toBe(6);
}); });
it('should have correct fields for each status card', () => { it('should have correct fields for each status card', () => {