pokemon-showdown/test/simulator/moves/disable.js
Ivo Julca 67da1a1221 Test: Use the new common#createBattle method
- This cuts down tons of code that define player names, avatars,
and deal with Team Preview.
2016-06-17 05:45:22 -05:00

22 lines
654 B
JavaScript

'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Disable', function () {
afterEach(function () {
battle.destroy();
});
it('should prevent the use of the target\'s last move', function () {
battle = common.createBattle();
battle.join('p1', 'Guest 1', 1, [{species: 'Abra', ability: 'synchronize', item: 'laggingtail', moves: ['disable']}]);
battle.join('p2', 'Guest 2', 1, [{species: 'Abra', ability: 'synchronize', moves: ['teleport']}]);
battle.commitDecisions();
battle.commitDecisions();
assert.strictEqual(battle.p2.active[0].lastMove, 'struggle');
});
});