mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-17 18:51:43 -05:00
25 lines
647 B
JavaScript
25 lines
647 B
JavaScript
'use strict';
|
|
|
|
const assert = require('./../../assert');
|
|
const common = require('./../../common');
|
|
|
|
let battle;
|
|
|
|
describe('U-turn', function () {
|
|
afterEach(function () {
|
|
battle.destroy();
|
|
});
|
|
|
|
it('should switch the user out after a successful hit against a Substitute', function () {
|
|
battle = common.createBattle([[
|
|
{species: 'Beedrill', ability: 'swarm', moves: ['uturn']},
|
|
{species: 'Kakuna', ability: 'shedskin', moves: ['harden']},
|
|
], [
|
|
{species: 'Alakazam', ability: 'magicguard', moves: ['substitute']},
|
|
]]);
|
|
|
|
battle.makeChoices('move uturn', 'move substitute');
|
|
assert.equal(battle.requestState, 'switch');
|
|
});
|
|
});
|