pokemon-showdown/test/simulator/moves/disable.js
Juanma Serrano c4ac8d6e2f Use strict mode and let and const instead of var
This commit also fixes some duplicated variable declarations.
2015-11-06 21:56:52 -05:00

20 lines
613 B
JavaScript

'use strict';
const assert = require('assert');
let battle;
describe('Disable', function () {
afterEach(function () {
battle.destroy();
});
it('should prevent the use of the target\'s last move', function () {
battle = BattleEngine.Battle.construct();
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');
});
});