Skip to content

Commit

Permalink
Fix nesting of multigen tests (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrianshChari authored Oct 23, 2024
1 parent 4a91f61 commit f93012e
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions calc/src/test/calc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,34 +722,32 @@ describe('calc', () => {
'Lvl 90 Chansey Seismic Toss vs. Lvl 30 0 HP 0 IVs Mew: 90-90 (90 - 90%) -- guaranteed OHKO after sandstorm damage and burn damage'
);
});
});
inGens(4, 9, ({gen, calculate, Pokemon, Move, Field}) => {
test(`Mold Breaker does not disable abilities that don't affect direct damage (gen ${gen})`, () => {
const attacker = Pokemon('Rampardos', {
ability: 'Mold Breaker',
});

inGens(4, 9, ({gen, calculate, Pokemon, Move, Field}) => {
test(`Mold Breaker does not disable abilities that don't affect direct damage (gen ${gen})`, () => {
const attacker = Pokemon('Rampardos', {
ability: 'Mold Breaker',
});

const defender = Pokemon('Blastoise', {
ability: 'Rain Dish',
});
const defender = Pokemon('Blastoise', {
ability: 'Rain Dish',
});

const field = Field({
weather: 'Rain',
});
const field = Field({
weather: 'Rain',
});

const move = Move('Stone Edge');
const move = Move('Stone Edge');

const result = calculate(attacker, defender, move, field);
const result = calculate(attacker, defender, move, field);

expect(result.defender.ability).toBe('Rain Dish');
expect(result.defender.ability).toBe('Rain Dish');

expect(result.desc()).toBe(
'0 Atk Mold Breaker Rampardos Stone Edge vs. 0 HP / 0 Def Blastoise: 168-198 (56.1 - 66.2%) -- guaranteed 2HKO after Rain Dish recovery'
);
});
expect(result.desc()).toBe(
'0 Atk Mold Breaker Rampardos Stone Edge vs. 0 HP / 0 Def Blastoise: 168-198 (56.1 - 66.2%) -- guaranteed 2HKO after Rain Dish recovery'
);
});
});

inGens(8, 9, ({gen, calculate, Pokemon, Move, Field}) => {
test('Steely Spirit should boost Steel-type moves as a field effect.', () => {
const pokemon = Pokemon('Perrserker', {
Expand Down

0 comments on commit f93012e

Please sign in to comment.