Spaces:
Running
Running
File size: 873 Bytes
5c2ed06 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe(`Cheek Pouch`, () => {
afterEach(() => {
battle.destroy();
});
it(`should restore 1/3 HP to the user after eating a Berry`, () => {
battle = common.createBattle([[
{ species: 'wynaut', item: 'lumberry', ability: 'cheekpouch', moves: ['sleeptalk'] },
], [
{ species: 'pichu', moves: ['nuzzle'] },
]]);
const wynaut = battle.p1.active[0];
battle.makeChoices();
assert.fullHP(wynaut);
});
it(`should not activate if the user was at full HP`, () => {
battle = common.createBattle([[
{ species: 'wynaut', item: 'lumberry', ability: 'cheekpouch', moves: ['sleeptalk'] },
], [
{ species: 'pichu', moves: ['glare'] },
]]);
battle.makeChoices();
assert(battle.log.every(line => !line.startsWith('|-heal')));
});
});
|