mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-17 18:51:43 -05:00
This makes it so we can use `assert.equal` instead of `assert.strictEqual`, which I think is more readable.
44 lines
1.4 KiB
JavaScript
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, '');
|
|
});
|
|
});
|