pokemon-showdown/test/sim/moves/glare.js
Guangcong Luo 229f5f809d Use assert in strict mode
This makes it so we can use `assert.equal` instead of
`assert.strictEqual`, which I think is more readable.
2020-02-20 00:39:31 -08:00

44 lines
1.4 KiB
JavaScript

'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Glare', function () {
afterEach(function () {
battle.destroy();
});
it('should inflict paralysis on its target', function () {
battle = common.createBattle();
battle.setPlayer('p1', {team: [{species: "Arbok", ability: 'noguard', moves: ['glare']}]});
battle.setPlayer('p2', {team: [{species: "Ekans", ability: 'sturdy', moves: ['bulkup']}]});
battle.makeChoices('move glare', 'move bulkup');
assert.equal(battle.p2.active[0].status, 'par');
});
it('should ignore natural type immunities', function () {
battle = common.createBattle();
battle.setPlayer('p1', {team: [{species: "Arbok", ability: 'noguard', moves: ['glare']}]});
battle.setPlayer('p2', {team: [{species: "Gengar", ability: 'blaze', moves: ['bulkup']}]});
battle.makeChoices('move glare', 'move bulkup');
assert.equal(battle.p2.active[0].status, 'par');
});
});
describe('Glare [Gen 3]', function () {
afterEach(function () {
battle.destroy();
});
it('should not ignore natural type immunities', function () {
battle = common.gen(3).createBattle([
[{species: "Arbok", ability: 'noguard', moves: ['glare']}],
[{species: "Gengar", ability: 'blaze', moves: ['bulkup']}],
]);
battle.makeChoices('move glare', 'move bulkup');
assert.equal(battle.p2.active[0].status, '');
});
});