diff --git a/sim/state.ts b/sim/state.ts
index 42cdea1057..8e6f1d0de4 100644
--- a/sim/state.ts
+++ b/sim/state.ts
@@ -401,7 +401,7 @@ export const State = new class {
if (skip.has(key)) continue;
const val = this.serializeWithRefs(value, battle);
// JSON.stringify will get rid of keys with undefined values anyway, but
- // we also do it here so that assert.deepStrictEqual works on battle.toJSON().
+ // we also do it here so that assert.deepEqual works on battle.toJSON().
if (typeof val !== 'undefined') state[key] = val;
}
return state;
diff --git a/sim/tools/runner.ts b/sim/tools/runner.ts
index d254cc6158..58addbfb90 100644
--- a/sim/tools/runner.ts
+++ b/sim/tools/runner.ts
@@ -5,8 +5,8 @@
* @license MIT
*/
-import assert = require('assert');
-import fs = require('fs');
+import {strict as assert} from 'assert';
+import * as fs from 'fs';
import {ObjectReadWriteStream} from '../../lib/streams';
import {Battle} from '../battle';
@@ -156,7 +156,7 @@ class DualStream {
get rawInputLog() {
const control = this.control.rawInputLog;
const test = this.test.rawInputLog;
- assert.deepStrictEqual(test, control);
+ assert.deepEqual(test, control);
return control;
}
@@ -165,7 +165,7 @@ class DualStream {
const test = await this.test.read();
// In debug mode, wait to catch this as a difference in the inputLog
// and error there so we get the full battle state dumped instead.
- if (!this.debug) assert.strictEqual(test, control);
+ if (!this.debug) assert.equal(test, control);
return control;
}
@@ -188,7 +188,7 @@ class DualStream {
const control = this.control.battle.toJSON();
const test = this.test.battle.toJSON();
try {
- assert.deepStrictEqual(test, control);
+ assert.deepEqual(test, control);
} catch (err) {
if (this.debug) {
// NOTE: diffing these directly won't work because the key ordering isn't stable.
diff --git a/test/common.js b/test/common.js
index c5c6a0ff40..d347f6b9e0 100644
--- a/test/common.js
+++ b/test/common.js
@@ -1,6 +1,6 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
const Sim = require('./../.sim-dist');
const Dex = Sim.Dex;
diff --git a/test/lib/dashycode.js b/test/lib/dashycode.js
index 25a7a75287..808cf2433b 100644
--- a/test/lib/dashycode.js
+++ b/test/lib/dashycode.js
@@ -1,6 +1,6 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
const Dashycode = require('./../../.lib-dist/dashycode');
describe('Dashycode', function () {
@@ -16,18 +16,18 @@ describe('Dashycode', function () {
const encode = (codepoint) => {
const character = String.fromCodePoint(codepoint);
const dashycode = Dashycode.encode(character);
- assert.strictEqual(encoded.has(dashycode), false);
+ assert.equal(encoded.has(dashycode), false);
encoded.set(dashycode, character);
};
const decode = (dashycode) => {
const character = Dashycode.decode(dashycode);
- assert.strictEqual(encoded.get(dashycode), character);
+ assert.equal(encoded.get(dashycode), character);
};
const transcode = (plaintext) => function () {
const ciphertext = Dashycode.encode(plaintext);
- assert.strictEqual(Dashycode.decode(ciphertext), plaintext);
+ assert.equal(Dashycode.decode(ciphertext), plaintext);
};
const transcodeWithSets = (set1, set2) => function () {
@@ -51,7 +51,7 @@ describe('Dashycode', function () {
plaintext += (bitmask & 0x8000) ? set1[15] : set2[15];
const ciphertext = Dashycode.encode(plaintext);
- assert.strictEqual(Dashycode.decode(ciphertext), plaintext);
+ assert.equal(Dashycode.decode(ciphertext), plaintext);
}
};
diff --git a/test/server/chat-plugins/trivia.js b/test/server/chat-plugins/trivia.js
index 1d137301eb..48a29f0f11 100644
--- a/test/server/chat-plugins/trivia.js
+++ b/test/server/chat-plugins/trivia.js
@@ -1,6 +1,6 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
const userUtils = require('../../users-utils');
const User = userUtils.User;
@@ -70,13 +70,13 @@ describe('Trivia', function () {
it('should add new players', function () {
this.game.addPlayer(this.user);
- assert.strictEqual(this.game.playerCount, 1);
+ assert.equal(this.game.playerCount, 1);
});
it('should not add a player if they have already joined', function () {
this.game.addPlayer(this.user);
this.game.addPlayer(this.user);
- assert.strictEqual(this.game.playerCount, 1);
+ assert.equal(this.game.playerCount, 1);
});
it('should not add a player if another one on the same IP has joined', function () {
@@ -85,7 +85,7 @@ describe('Trivia', function () {
let user2 = makeUser('Not Morfent', new Connection('127.0.0.1'));
this.game.addPlayer(user2);
- assert.strictEqual(this.game.playerCount, 1);
+ assert.equal(this.game.playerCount, 1);
destroyUser(user2);
});
@@ -99,27 +99,27 @@ describe('Trivia', function () {
let user2 = makeUser(name, new Connection('127.0.0.3'));
this.game.addPlayer(user2);
- assert.strictEqual(this.game.playerCount, 1);
+ assert.equal(this.game.playerCount, 1);
destroyUser(user2);
});
it('should not add a player if they were kicked from the game', function () {
this.game.kickedUsers.add(this.tarUser.id);
this.game.addPlayer(this.tarUser);
- assert.strictEqual(this.game.playerCount, 0);
+ assert.equal(this.game.playerCount, 0);
});
it('should kick players from the game', function () {
this.game.addPlayer(this.tarUser);
this.game.kick(this.tarUser, this.user);
- assert.strictEqual(this.game.playerCount, 0);
+ assert.equal(this.game.playerCount, 0);
});
it('should not kick players already kicked from the game', function () {
this.game.addPlayer(this.tarUser);
this.game.kick(this.tarUser, this.user);
let res = this.game.kick(this.tarUser, this.user);
- assert.strictEqual(typeof res, 'string');
+ assert.equal(typeof res, 'string');
});
it('should not kick users who were kicked under another name', function () {
@@ -131,7 +131,7 @@ describe('Trivia', function () {
this.tarUser.forceRename('Not Morfent', true);
this.tarUser.prevNames[userid] = name;
this.game.addPlayer(this.tarUser);
- assert.strictEqual(this.game.playerCount, 0);
+ assert.equal(this.game.playerCount, 0);
});
it('should not add users who were kicked under another IP', function () {
@@ -143,31 +143,31 @@ describe('Trivia', function () {
let user2 = makeUser(name, new Connection('127.0.0.2'));
this.game.addPlayer(user2);
- assert.strictEqual(this.game.playerCount, 0);
+ assert.equal(this.game.playerCount, 0);
destroyUser(user2);
});
it('should not kick users that aren\'t players in the game', function () {
this.game.kick(this.tarUser, this.user);
- assert.strictEqual(this.game.playerCount, 0);
+ assert.equal(this.game.playerCount, 0);
});
it('should make players leave the game', function () {
this.game.leave(this.user);
- assert.strictEqual(this.game.playerTable[this.user.id], undefined);
+ assert.equal(this.game.playerTable[this.user.id], undefined);
});
it('should not make users who are not players leave the game', function () {
this.game.leave(this.user);
let res = this.game.leave(this.user);
- assert.strictEqual(typeof res, 'string');
+ assert.equal(typeof res, 'string');
});
it('should verify answers correctly', function () {
this.game.askQuestion();
- assert.strictEqual(this.game.verifyAnswer('answer'), true);
- assert.strictEqual(this.game.verifyAnswer('anser'), true);
- assert.strictEqual(this.game.verifyAnswer('not the right answer'), false);
+ assert.equal(this.game.verifyAnswer('answer'), true);
+ assert.equal(this.game.verifyAnswer('anser'), true);
+ assert.equal(this.game.verifyAnswer('not the right answer'), false);
});
it('should not throw when attempting to broadcast after the game has ended', function () {
@@ -212,16 +212,16 @@ describe('Trivia', function () {
it('should mark a player absent on leave and pause the game', function () {
this.user.leaveRoom(this.room);
- assert.strictEqual(this.player.isAbsent, true);
- assert.strictEqual(this.game.phase, 'limbo');
- assert.strictEqual(this.game.phaseTimeout, null);
+ assert.equal(this.player.isAbsent, true);
+ assert.equal(this.game.phase, 'limbo');
+ assert.equal(this.game.phaseTimeout, null);
});
it('should unpause the game once enough players have returned', function () {
this.user.leaveRoom(this.room);
this.user.joinRoom(this.room);
- assert.strictEqual(this.player.isAbsent, false);
- assert.strictEqual(this.game.phase, 'question');
+ assert.equal(this.player.isAbsent, false);
+ assert.equal(this.game.phase, 'question');
assert.ok(this.game.phaseTimeout);
});
});
@@ -258,29 +258,29 @@ describe('Trivia', function () {
it('should calculate player points correctly', function () {
let points = this.game.calculatePoints();
- assert.strictEqual(points, 5);
+ assert.equal(points, 5);
});
it('should allow users to answer questions correctly', function () {
this.game.answerQuestion('answer', this.user);
- assert.strictEqual(this.player.correctAnswers, 1);
+ assert.equal(this.player.correctAnswers, 1);
});
it('should mark players who answer incorrectly', function () {
this.game.answerQuestion('not the right answer', this.user);
- assert.strictEqual(this.player.correctAnswers, 0);
+ assert.equal(this.player.correctAnswers, 0);
});
it('should only reward a player points once per question', function () {
this.game.answerQuestion('answer', this.user);
this.game.answerQuestion('answer', this.user);
- assert.strictEqual(this.player.correctAnswers, 1);
+ assert.equal(this.player.correctAnswers, 1);
});
it('should clear player answers if none answer correctly', function () {
this.game.answerQuestion('not the right answer', this.user);
this.game.tallyAnswers();
- assert.strictEqual(this.player.answer, '');
+ assert.equal(this.player.answer, '');
});
it('should not give NaN points to correct responders', function () {
@@ -326,21 +326,21 @@ describe('Trivia', function () {
for (let i = 6; i--;) {
diff += totalDiff / 5;
let points = this.game.calculatePoints(diff, totalDiff);
- assert.strictEqual(points, i);
+ assert.equal(points, i);
}
});
it('should set players as having answered correctly or incorrectly', function () {
this.game.answerQuestion('not the right answer', this.user);
- assert.strictEqual(this.player.isCorrect, false);
+ assert.equal(this.player.isCorrect, false);
this.game.answerQuestion('answer', this.user);
- assert.strictEqual(this.player.isCorrect, true);
+ assert.equal(this.player.isCorrect, true);
});
it('should give points for correct answers', function () {
this.game.answerQuestion('answer', this.user);
this.game.tallyAnswers();
- assert.strictEqual(this.player.correctAnswers, 1);
+ assert.equal(this.player.correctAnswers, 1);
});
it('should choose the quicker answerer on tie', function (done) {
@@ -398,7 +398,7 @@ describe('Trivia', function () {
it('should calculate points correctly', function () {
this.game.playerCount = 5;
for (let i = 1; i <= 5; i++) {
- assert.strictEqual(this.game.calculatePoints(i), 6 - i);
+ assert.equal(this.game.calculatePoints(i), 6 - i);
}
});
@@ -408,13 +408,13 @@ describe('Trivia', function () {
it('should not give points for answering incorrectly', function () {
this.game.answerQuestion('not the right answer', this.user);
this.game.tallyAnswers();
- assert.strictEqual(this.player.correctAnswers, 0);
+ assert.equal(this.player.correctAnswers, 0);
});
it('should give points for answering correctly', function () {
this.game.answerQuestion('answer', this.user);
this.game.tallyAnswers();
- assert.strictEqual(this.player.correctAnswers, 1);
+ assert.equal(this.player.correctAnswers, 1);
});
it('should not give NaN points to correct responders', function () {
diff --git a/test/server/chat.js b/test/server/chat.js
index 54b041d44f..e6bb61235a 100644
--- a/test/server/chat.js
+++ b/test/server/chat.js
@@ -1,90 +1,90 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
describe('Chat', function () {
it('should run formatText correctly', function () {
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`hi **__bold italics__** ^^superscript^^ \\\\subscript\\\\ normal ~~strikethrough~~ bye`),
`hi bold italics superscript subscript normal strikethrough bye`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`__**reverse nesting**__`),
`reverse nesting`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`__**bad nesting__**`),
`**bad nesting**`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`spaced ** out ** no __also no __ ~~ also no~~ ok`),
`spaced ** out ** no __also no __ ~~ also no~~ ok`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`hi \`\` \` \`\` bye`),
`hi \` bye`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`hi \`\`inside __not__ formatted\`\` bye`),
`hi inside __not__ formatted bye`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`<> <>`),
`«roomid-1-2-3» <<roomid_1_2_3>>`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`hi __spoiler: bye__ hi again (parenthetical spoiler: bye again (or not!!!!)) that was fun`),
`hi spoiler: bye hi again (parenthetical spoiler: bye again (or not!!!!)) that was fun`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`hi google.com/__a__ bye >w<`),
`hi google.com/__a__ bye >w<`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`(https://en.wikipedia.org/wiki/Pokémon_(video_game_series))`),
`(https://en.wikipedia.org/wiki/Pokémon_(video_game_series))`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`hi email@email.com bye >w<`),
`hi email@email.com bye >w<`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`hi email@email.example bye >w<`),
`hi email@email.example bye >w<`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`>greentext`),
`>greentext`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`>w< not greentext >also not greentext`),
`>w< not greentext >also not greentext`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`[[Google ]] >w<`),
`Google <google.com> >w<`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`[[Google ]] >w<`, true),
`Google >w<`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`[[wiki: Pokemon]] >w<`, true),
`wiki: Pokemon >w<`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`[[wiki: D&D D&D]] [[A>B A>B]] &`, true),
`wiki: D&D D&D A>B A>B &`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`[[pokemon: Oshawott]] >w<`, true),
` >w<`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`[[item: Beast ball]] >w<`),
`[Beast ball] >w<`
);
- assert.strictEqual(
+ assert.equal(
Chat.formatText(`:)`, true),
`:)`
);
diff --git a/test/server/ladders.js b/test/server/ladders.js
index 504f3a8b81..2081e074f7 100644
--- a/test/server/ladders.js
+++ b/test/server/ladders.js
@@ -1,6 +1,6 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
global.Ladders = require('../../.server-dist/ladders').Ladders;
const {Connection, User} = require('../users-utils');
@@ -49,46 +49,46 @@ describe('Matchmaker', function () {
let formatSearches = Ladders.searches.get(FORMATID);
assert.ok(formatSearches instanceof Map);
- assert.strictEqual(formatSearches.size, 1);
- assert.strictEqual(s1.userid, this.p1.id);
- assert.strictEqual(s1.team, this.p1.team);
- assert.strictEqual(s1.rating, 1000);
+ assert.equal(formatSearches.size, 1);
+ assert.equal(s1.userid, this.p1.id);
+ assert.equal(s1.team, this.p1.team);
+ assert.equal(s1.rating, 1000);
});
it('should matchmake users when appropriate', function () {
addSearch(this.p1);
addSearch(this.p2);
- assert.strictEqual(Ladders.searches.get(FORMATID).size, 0);
+ assert.equal(Ladders.searches.get(FORMATID).size, 0);
});
it('should matchmake users within a reasonable rating range', function () {
addSearch(this.p1);
addSearch(this.p2, 2000);
- assert.strictEqual(Ladders.searches.get(FORMATID).size, 2);
+ assert.equal(Ladders.searches.get(FORMATID).size, 2);
});
it('should cancel searches', function () {
addSearch(this.p1);
Ladders(FORMATID).cancelSearch(this.p1);
Ladders.cancelSearches(this.p2);
- assert.strictEqual(Ladders.searches.get(FORMATID).size, 0);
+ assert.equal(Ladders.searches.get(FORMATID).size, 0);
});
it('should periodically matchmake users when appropriate', function () {
addSearch(this.p1);
let s2 = addSearch(this.p2, 2000);
- assert.strictEqual(Ladders.searches.get(FORMATID).size, 2);
+ assert.equal(Ladders.searches.get(FORMATID).size, 2);
s2.rating = 1000;
Ladders.Ladder.periodicMatch();
- assert.strictEqual(Ladders.searches.get(FORMATID).size, 0);
+ assert.equal(Ladders.searches.get(FORMATID).size, 0);
});
it('should create a new battle room after matchmaking', function () {
- assert.strictEqual(this.p1.games.size, 0);
+ assert.equal(this.p1.games.size, 0);
addSearch(this.p1);
addSearch(this.p2);
- assert.strictEqual(this.p1.games.size, 1);
+ assert.equal(this.p1.games.size, 1);
for (const roomid of this.p1.games) {
assert.ok(Rooms.get(roomid).battle);
}
@@ -97,13 +97,13 @@ describe('Matchmaker', function () {
it('should cancel search on disconnect', function () {
addSearch(this.p1);
this.p1.onDisconnect(this.p1.connections[0]);
- assert.strictEqual(Ladders.searches.get(FORMATID).size, 0);
+ assert.equal(Ladders.searches.get(FORMATID).size, 0);
});
it('should cancel search on merge', function () {
addSearch(this.p1);
this.p2.merge(this.p1);
- assert.strictEqual(Ladders.searches.get(FORMATID).size, 0);
+ assert.equal(Ladders.searches.get(FORMATID).size, 0);
});
describe('#startBattle', function () {
@@ -123,7 +123,7 @@ describe('Matchmaker', function () {
try {
room = Rooms.createBattle(FORMATID, {p1: this.p1, p2: this.p1, p1team: this.s1.team, p2team: this.s2.team, rated: 1000});
} catch (e) {}
- assert.strictEqual(room, undefined);
+ assert.equal(room, undefined);
});
before(function () {
@@ -138,7 +138,7 @@ describe('Matchmaker', function () {
it('should prevent battles from starting if the server is in lockdown', function () {
let room = Rooms.createBattle(FORMATID, {p1: this.p1, p2: this.p2, p1team: this.s1.team, p2team: this.s2.team, rated: 1000});
- assert.strictEqual(room, undefined);
+ assert.equal(room, undefined);
});
});
});
diff --git a/test/server/room-battle.js b/test/server/room-battle.js
index 916932fb49..556d51c4d8 100644
--- a/test/server/room-battle.js
+++ b/test/server/room-battle.js
@@ -1,6 +1,6 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
const {User} = require('../users-utils');
@@ -29,7 +29,7 @@ describe('Simulator abstraction layer features', function () {
room = Rooms.createBattle('', {p1, p2, p1team: packedTeam, p2team: packedTeam, allowRenames: false});
p1.resetName();
for (const player of room.battle.players) {
- assert.strictEqual(player, room.battle.playerTable[toID(player.name)]);
+ assert.equal(player, room.battle.playerTable[toID(player.name)]);
}
});
});
diff --git a/test/server/rooms.js b/test/server/rooms.js
index 0c649f4942..08968b4da9 100644
--- a/test/server/rooms.js
+++ b/test/server/rooms.js
@@ -1,6 +1,6 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
const {User} = require('../users-utils');
@@ -8,7 +8,7 @@ describe('Rooms features', function () {
describe('Rooms', function () {
describe('Rooms.get', function () {
it('should be a function', function () {
- assert.strictEqual(typeof Rooms.get, 'function');
+ assert.equal(typeof Rooms.get, 'function');
});
});
describe('Rooms.rooms', function () {
@@ -26,8 +26,8 @@ describe('Rooms features', function () {
const room = Rooms.createChatRoom('r/relationshipadvice');
const game = new Hangman(room, new User(), 'There\'s a lot of red flags here');
room.game = game;
- assert.strictEqual(room.getGame(Hangman), game);
- assert.strictEqual(room.getGame(Uno), null);
+ assert.equal(room.getGame(Hangman), game);
+ assert.equal(room.getGame(Uno), null);
});
});
});
@@ -79,7 +79,7 @@ describe('Rooms features', function () {
},
};
room = Rooms.createBattle('customgame', options);
- assert.strictEqual(room.getAuth(new User()), '%');
+ assert.equal(room.getAuth(new User()), '%');
});
it('should prevent overriding tournament room auth by a tournament player', function () {
@@ -107,11 +107,11 @@ describe('Rooms features', function () {
room = Rooms.createBattle('customgame', options);
roomStaff.joinRoom(room);
administrator.joinRoom(room);
- assert.strictEqual(room.getAuth(roomStaff), '%', 'before promotion attempt');
+ assert.equal(room.getAuth(roomStaff), '%', 'before promotion attempt');
Chat.parse("/roomvoice Room auth", room, p1, p1.connections[0]);
- assert.strictEqual(room.getAuth(roomStaff), '%', 'after promotion attempt');
+ assert.equal(room.getAuth(roomStaff), '%', 'after promotion attempt');
Chat.parse("/roomvoice Room auth", room, administrator, administrator.connections[0]);
- assert.strictEqual(room.getAuth(roomStaff), '+', 'after being promoted by an administrator');
+ assert.equal(room.getAuth(roomStaff), '+', 'after being promoted by an administrator');
});
});
});
diff --git a/test/server/sockets.js b/test/server/sockets.js
index 331c000074..6ddc4e1e9c 100644
--- a/test/server/sockets.js
+++ b/test/server/sockets.js
@@ -1,6 +1,6 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
const cluster = require('cluster');
describe.skip('Sockets', function () {
@@ -27,25 +27,25 @@ describe.skip('Sockets', function () {
describe('master', function () {
it('should be able to spawn workers', function () {
Sockets.spawnWorker();
- assert.strictEqual(Sockets.workers.size, 1);
+ assert.equal(Sockets.workers.size, 1);
});
it('should be able to spawn workers on listen', function () {
Sockets.listen(0, '127.0.0.1', 1);
- assert.strictEqual(Sockets.workers.size, 1);
+ assert.equal(Sockets.workers.size, 1);
});
it('should be able to kill workers', function () {
return spawnWorker().then(worker => {
Sockets.killWorker(worker);
- assert.strictEqual(Sockets.workers.size, 0);
+ assert.equal(Sockets.workers.size, 0);
});
});
it('should be able to kill workers by PID', function () {
return spawnWorker().then(worker => {
Sockets.killPid(worker.process.pid);
- assert.strictEqual(Sockets.workers.size, 0);
+ assert.equal(Sockets.workers.size, 0);
});
});
});
@@ -75,10 +75,10 @@ describe.skip('Sockets', function () {
return spawnSocket(worker => data => {
let cmd = data.charAt(0);
let [sid, ip, protocol] = data.substr(1).split('\n');
- assert.strictEqual(cmd, '*');
- assert.strictEqual(sid, '1');
- assert.strictEqual(ip, '127.0.0.1');
- assert.strictEqual(protocol, 'websocket');
+ assert.equal(cmd, '*');
+ assert.equal(sid, '1');
+ assert.equal(ip, '127.0.0.1');
+ assert.equal(protocol, 'websocket');
});
});
@@ -102,7 +102,7 @@ describe.skip('Sockets', function () {
let sid = data.substr(1, data.indexOf('\n'));
socketSend = `>${sid}\n${msg}`;
}).then(chain(worker => data => {
- assert.strictEqual(data, msg);
+ assert.equal(data, msg);
}, socketSend));
});
@@ -119,9 +119,9 @@ describe.skip('Sockets', function () {
}).then(chain(worker => data => {
let cmd = data.charAt(0);
let params = data.substr(1).split('\n');
- assert.strictEqual(cmd, '<');
- assert.strictEqual(sid, params[0]);
- assert.strictEqual(msg, params[1]);
+ assert.equal(cmd, '<');
+ assert.equal(sid, params[0]);
+ assert.equal(msg, params[1]);
}, mockReceive));
});
@@ -161,7 +161,7 @@ describe.skip('Sockets', function () {
let sid = data.substr(1, data.indexOf('\n'));
Sockets.roomAdd(worker, cid, sid);
}).then(chain(worker => data => {
- assert.strictEqual(data, msg);
+ assert.equal(data, msg);
}, roomSend));
});
@@ -205,7 +205,7 @@ describe.skip('Sockets', function () {
let scid = '1';
Sockets.channelMove(worker, cid, scid, sid);
}).then(chain(worker => data => {
- assert.strictEqual(data, msg);
+ assert.equal(data, msg);
}, buf));
});
});
diff --git a/test/server/users.js b/test/server/users.js
index 723b56743d..8cbc1ff87d 100644
--- a/test/server/users.js
+++ b/test/server/users.js
@@ -1,6 +1,6 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
let userUtils = require('../users-utils');
let Connection = userUtils.Connection;
@@ -10,7 +10,7 @@ describe('Users features', function () {
describe('Users', function () {
describe('get', function () {
it('should be a function', function () {
- assert.strictEqual(typeof Users.get, 'function');
+ assert.equal(typeof Users.get, 'function');
});
});
describe('connections', function () {
@@ -32,16 +32,16 @@ describe('Users features', function () {
it('should remove the connection from Users.connections', function () {
let connectionid = this.connection.id;
this.connection.destroy();
- assert.strictEqual(Users.connections.has(connectionid), false);
+ assert.equal(Users.connections.has(connectionid), false);
});
it('should destroy any user on the connection as well', function () {
let user = new User(this.connection);
let userid = user.id;
- assert.strictEqual(Users.users.has(userid), true, 'before disconnecting');
+ assert.equal(Users.users.has(userid), true, 'before disconnecting');
user.disconnectAll();
user.destroy();
- assert.strictEqual(Users.users.has(userid), false, 'after disconnecting');
+ assert.equal(Users.users.has(userid), false, 'after disconnecting');
});
});
@@ -86,8 +86,8 @@ describe('Users features', function () {
while (--iterations) user.mergeConnection(new Connection());
user.disconnectAll();
- assert.strictEqual(user.connections.length, 0);
- assert.strictEqual(user.connected, false);
+ assert.equal(user.connections.length, 0);
+ assert.equal(user.connected, false);
});
it('should unref all ' + totalConnections + ' connection(s)', function () {
@@ -111,7 +111,7 @@ describe('Users features', function () {
user.disconnectAll();
for (let i = 0; i < totalConnections; i++) {
- assert.strictEqual(connections[i].user, null);
+ assert.equal(connections[i].user, null);
}
});
}
@@ -127,21 +127,21 @@ describe('Users features', function () {
Punishments.sharedIps = new Map();
let users = ['127.0.0.1', '127.0.0.1'].map(ip => new User(new Connection(ip)));
Punishments.ban(users[0]);
- assert.strictEqual(users[0].connected, false);
- assert.strictEqual(users[1].connected, false);
+ assert.equal(users[0].connected, false);
+ assert.equal(users[1].connected, false);
});
it('should not disconnect users at other IPs', function () {
let users = ['127.0.0.1', '127.0.0.2'].map(ip => new User(new Connection(ip)));
Punishments.ban(users[0]);
- assert.strictEqual(users[1].connected, true);
+ assert.equal(users[1].connected, true);
});
it('should update IP count properly', function () {
let user = new User();
Punishments.ban(user);
for (let ip in user.ips) {
- assert.strictEqual(user.ips[ip], 0);
+ assert.equal(user.ips[ip], 0);
}
});
});
@@ -160,28 +160,28 @@ describe('Users features', function () {
it(`should allow 's' permissions only on self`, function () {
const user = new User();
user.group = '+';
- assert.strictEqual(user.can('alts', user), true, 'targeting self');
+ assert.equal(user.can('alts', user), true, 'targeting self');
const target = new User();
target.group = ' ';
- assert.strictEqual(user.can('alts', target), false, 'targeting lower rank');
+ assert.equal(user.can('alts', target), false, 'targeting lower rank');
target.group = '+';
- assert.strictEqual(user.can('alts', target), false, 'targeting same rank');
+ assert.equal(user.can('alts', target), false, 'targeting same rank');
target.group = '%';
- assert.strictEqual(user.can('alts', target), false, 'targeting higher rank');
+ assert.equal(user.can('alts', target), false, 'targeting higher rank');
});
it(`should allow 'u' permissions on lower ranked users`, function () {
const user = new User();
user.group = '&';
- assert.strictEqual(user.can('promote', user), false, 'targeting self');
+ assert.equal(user.can('promote', user), false, 'targeting self');
const target = new User();
target.group = ' ';
- assert.strictEqual(user.can('promote', target), true, 'targeting lower rank');
+ assert.equal(user.can('promote', target), true, 'targeting lower rank');
target.group = '&';
- assert.strictEqual(user.can('promote', target), false, 'targeting same rank');
+ assert.equal(user.can('promote', target), false, 'targeting same rank');
target.group = '~';
- assert.strictEqual(user.can('promote', target), false, 'targeting higher rank');
+ assert.equal(user.can('promote', target), false, 'targeting higher rank');
});
it(`should not allow users to demote themselves`, function () {
room = Rooms.createChatRoom("test");
@@ -191,9 +191,9 @@ describe('Users features', function () {
user.joinRoom(room);
for (const group of [' ', '+', '@']) {
room.auth[user.id] = group;
- assert.strictEqual(room.getAuth(user), group, 'before demotion attempt');
+ assert.equal(room.getAuth(user), group, 'before demotion attempt');
Chat.parse("/roomdeauth User", room, user, user.connections[0]);
- assert.strictEqual(room.getAuth(user), group, 'after demotion attempt');
+ assert.equal(room.getAuth(user), group, 'after demotion attempt');
}
});
});
diff --git a/test/sim/abilities/aftermath.js b/test/sim/abilities/aftermath.js
index db97aff125..2f2f1919ac 100644
--- a/test/sim/abilities/aftermath.js
+++ b/test/sim/abilities/aftermath.js
@@ -16,6 +16,6 @@ describe('Aftermath', function () {
battle.setPlayer('p2', {team: [{species: 'Shiftry', ability: 'aftermath', moves: ['sleeptalk']}]});
battle.makeChoices('move lunge', 'move sleeptalk');
const attacker = battle.p1.active[0];
- assert.strictEqual(attacker.hp, attacker.maxhp - Math.floor(attacker.maxhp / 4));
+ assert.equal(attacker.hp, attacker.maxhp - Math.floor(attacker.maxhp / 4));
});
});
diff --git a/test/sim/abilities/arenatrap.js b/test/sim/abilities/arenatrap.js
index 4c447ed5fd..69e34f7bc8 100644
--- a/test/sim/abilities/arenatrap.js
+++ b/test/sim/abilities/arenatrap.js
@@ -35,7 +35,7 @@ describe('Arena Trap', function () {
assert.species(p2active[0], 'Magnezone'); // Magnezone is trapped
- assert.strictEqual(p2active[0].name, "Magnezone");
+ assert.equal(p2active[0].name, "Magnezone");
battle.makeChoices('default', 'move magnetrise');
battle.makeChoices('move snore', 'switch 6');
diff --git a/test/sim/abilities/cloudnine.js b/test/sim/abilities/cloudnine.js
index 5bb19cd267..d896a167b0 100644
--- a/test/sim/abilities/cloudnine.js
+++ b/test/sim/abilities/cloudnine.js
@@ -28,10 +28,10 @@ describe('Cloud Nine', function () {
battle.makeChoices('move rest', 'move calmmind');
move = Dex.getMove('firepledge');
basePower = battle.runEvent('BasePower', battle.p2.active[0], battle.p1.active[0], move, move.basePower, true);
- assert.strictEqual(basePower, move.basePower);
+ assert.equal(basePower, move.basePower);
move = Dex.getMove('waterpledge');
basePower = battle.runEvent('BasePower', battle.p2.active[0], battle.p1.active[0], move, move.basePower, true);
- assert.strictEqual(basePower, move.basePower);
+ assert.equal(basePower, move.basePower);
});
it('should negate the effects of Rain on Fire-type and Water-type attacks', function () {
@@ -42,10 +42,10 @@ describe('Cloud Nine', function () {
battle.makeChoices('move rest', 'move calmmind');
move = Dex.getMove('firepledge');
basePower = battle.runEvent('BasePower', battle.p2.active[0], battle.p1.active[0], move, move.basePower, true);
- assert.strictEqual(basePower, move.basePower);
+ assert.equal(basePower, move.basePower);
move = Dex.getMove('waterpledge');
basePower = battle.runEvent('BasePower', battle.p2.active[0], battle.p1.active[0], move, move.basePower, true);
- assert.strictEqual(basePower, move.basePower);
+ assert.equal(basePower, move.basePower);
});
it('should negate the damage-dealing effects of Sandstorm', function () {
@@ -88,11 +88,11 @@ describe('Cloud Nine', function () {
battle.setPlayer('p1', {team: [{species: 'Golduck', ability: 'cloudnine', moves: ['calmmind']}]});
battle.setPlayer('p2', {team: [{species: 'Sunkern', ability: 'solarpower', moves: ['sunnyday']}]});
battle.makeChoices('move calmmind', 'move sunnyday');
- assert.strictEqual(battle.log[battle.lastMoveLine + 1], '|-weather|SunnyDay');
+ assert.equal(battle.log[battle.lastMoveLine + 1], '|-weather|SunnyDay');
for (let i = 0; i < 4; i++) {
- assert.strictEqual(battle.log[battle.lastMoveLine + 3], '|-weather|SunnyDay|[upkeep]');
+ assert.equal(battle.log[battle.lastMoveLine + 3], '|-weather|SunnyDay|[upkeep]');
battle.makeChoices('move calmmind', 'move sunnyday');
}
- assert.strictEqual(battle.log[battle.lastMoveLine + 3], '|-weather|none');
+ assert.equal(battle.log[battle.lastMoveLine + 3], '|-weather|none');
});
});
diff --git a/test/sim/abilities/comatose.js b/test/sim/abilities/comatose.js
index 1171fd8199..a79606a5cd 100644
--- a/test/sim/abilities/comatose.js
+++ b/test/sim/abilities/comatose.js
@@ -67,9 +67,9 @@ describe('Comatose', function () {
});
battle.makeChoices('move endure', 'move hex');
- assert.strictEqual(bp, battle.dex.getMove('hex').basePower * 2);
+ assert.equal(bp, battle.dex.getMove('hex').basePower * 2);
battle.makeChoices('move endure', 'move wakeupslap');
- assert.strictEqual(bp, battle.dex.getMove('wakeupslap').basePower * 2);
+ assert.equal(bp, battle.dex.getMove('wakeupslap').basePower * 2);
});
});
diff --git a/test/sim/abilities/desolateland.js b/test/sim/abilities/desolateland.js
index bdcec61c07..21c8b05276 100644
--- a/test/sim/abilities/desolateland.js
+++ b/test/sim/abilities/desolateland.js
@@ -27,7 +27,7 @@ describe('Desolate Land', function () {
assert.hurtsBy(defender, 152, () => battle.makeChoices('move incinerate', 'move splash'));
const move = Dex.getMove('incinerate');
const basePower = battle.runEvent('BasePower', attacker, defender, move, move.basePower, true);
- assert.strictEqual(basePower, move.basePower);
+ assert.equal(basePower, move.basePower);
});
it('should cause Water-type attacks to fail', function () {
@@ -76,7 +76,7 @@ describe('Desolate Land', function () {
]});
battle.onEvent('Hit', battle.format, (target, pokemon, move) => {
if (move.id === 'weatherball') {
- assert.strictEqual(move.type, 'Fire');
+ assert.equal(move.type, 'Fire');
}
});
const myActive = battle.p2.active;
@@ -87,7 +87,7 @@ describe('Desolate Land', function () {
battle.makeChoices('move helpinghand', 'switch 3');
assert.false.fullHP(myActive[0], "Charizard should be hurt by Solar Power");
battle.makeChoices('move solarbeam', 'switch 4');
- assert.strictEqual(myActive[0].getStat('spe'), 2 * myActive[0].storedStats['spe'], "Venusaur's speed should be doubled by Chlorophyll");
+ assert.equal(myActive[0].getStat('spe'), 2 * myActive[0].storedStats['spe'], "Venusaur's speed should be doubled by Chlorophyll");
assert.false.fullHP(myActive[0], "Solar Beam should skip its charge turn");
battle.makeChoices('move helpinghand', 'switch 5');
assert.false.fullHP(myActive[0], "Toxicroak should be hurt by Dry Skin");
diff --git a/test/sim/abilities/emergencyexit.js b/test/sim/abilities/emergencyexit.js
index 6de5997c5c..db94741a81 100644
--- a/test/sim/abilities/emergencyexit.js
+++ b/test/sim/abilities/emergencyexit.js
@@ -18,9 +18,9 @@ describe(`Emergency Exit`, function () {
const eePokemon = battle.p1.active[0];
const foePokemon = battle.p2.active[0];
battle.makeChoices('move superfang', 'move superfang');
- assert.strictEqual(foePokemon.hp, foePokemon.maxhp);
+ assert.equal(foePokemon.hp, foePokemon.maxhp);
assert.atMost(eePokemon.hp, eePokemon.maxhp / 2);
- assert.strictEqual(battle.requestState, 'switch');
+ assert.equal(battle.requestState, 'switch');
});
it(`should request switch-out at the end of a multi-hit move`, function () {
@@ -30,7 +30,7 @@ describe(`Emergency Exit`, function () {
]);
battle.makeChoices('move bulletseed', 'move sleeptalk');
battle.makeChoices('move bulletseed', 'move sleeptalk');
- assert.strictEqual(battle.requestState, 'switch');
+ assert.equal(battle.requestState, 'switch');
});
it(`should not request switch-out if attacked and healed by berry`, function () {
@@ -39,7 +39,7 @@ describe(`Emergency Exit`, function () {
[{species: "Raticate", ability: 'guts', moves: ['superfang']}],
]);
battle.makeChoices('move sleeptalk', 'move superfang');
- assert.strictEqual(battle.requestState, 'move');
+ assert.equal(battle.requestState, 'move');
});
it(`should not request switch-out if fainted`, function () {
@@ -69,7 +69,7 @@ describe(`Emergency Exit`, function () {
battle.makeChoices('move splash', 'move spikes');
battle.makeChoices('move splash', 'move spikes');
battle.makeChoices('switch 2', 'move protect');
- assert.strictEqual(battle.requestState, 'move');
+ assert.equal(battle.requestState, 'move');
});
it(`should not request switch-out on usage of Substitute`, function () {
@@ -82,7 +82,7 @@ describe(`Emergency Exit`, function () {
assert.false.atMost(eePokemon.hp, eePokemon.maxhp / 2);
battle.makeChoices('move substitute', 'move thunderbolt');
assert.atMost(eePokemon.hp, eePokemon.maxhp / 2);
- assert.strictEqual(battle.requestState, 'move');
+ assert.equal(battle.requestState, 'move');
});
it(`should prevent Volt Switch after-switches`, function () {
@@ -95,7 +95,7 @@ describe(`Emergency Exit`, function () {
assert.atMost(eePokemon.hp, eePokemon.maxhp / 2);
assert.false.holdsItem(eePokemon);
- assert.strictEqual(battle.requestState, 'switch');
+ assert.equal(battle.requestState, 'switch');
battle.makeChoices('default', '');
assert.species(battle.p1.active[0], 'Clefable');
@@ -112,7 +112,7 @@ describe(`Emergency Exit`, function () {
assert.atMost(eePokemon.hp, eePokemon.maxhp / 2);
assert.false.holdsItem(eePokemon);
- assert.strictEqual(battle.requestState, 'switch');
+ assert.equal(battle.requestState, 'switch');
battle.makeChoices('auto', '');
assert.species(battle.p1.active[0], 'Clefable');
@@ -129,7 +129,7 @@ describe(`Emergency Exit`, function () {
assert.atMost(eePokemon.hp, eePokemon.maxhp / 2);
assert.false.holdsItem(eePokemon);
- assert.strictEqual(battle.requestState, 'switch');
+ assert.equal(battle.requestState, 'switch');
battle.makeChoices('auto', '');
assert.species(battle.p1.active[0], 'Clefable');
@@ -143,6 +143,6 @@ describe(`Emergency Exit`, function () {
const eePokemon = battle.p1.active[0];
battle.makeChoices('move sleeptalk', 'move thunder');
assert.atMost(eePokemon.hp, eePokemon.maxhp / 2);
- assert.strictEqual(battle.requestState, 'move');
+ assert.equal(battle.requestState, 'move');
});
});
diff --git a/test/sim/abilities/flowergift.js b/test/sim/abilities/flowergift.js
index 1c9a6d55d2..7b52e5878a 100644
--- a/test/sim/abilities/flowergift.js
+++ b/test/sim/abilities/flowergift.js
@@ -23,10 +23,10 @@ describe('Flower Gift', function () {
// Set the weather to sun and re-check
battle.field.setWeather('sunnyday', 'debug');
- assert.strictEqual(battle.p1.active[0].getStat('atk'), battle.modify(cherAtk, 1.5));
- assert.strictEqual(battle.p1.active[0].getStat('spd'), battle.modify(cherSpd, 1.5));
- assert.strictEqual(battle.p1.active[1].getStat('atk'), battle.modify(baseAtk, 1.5));
- assert.strictEqual(battle.p1.active[1].getStat('spd'), battle.modify(baseSpd, 1.5));
+ assert.equal(battle.p1.active[0].getStat('atk'), battle.modify(cherAtk, 1.5));
+ assert.equal(battle.p1.active[0].getStat('spd'), battle.modify(cherSpd, 1.5));
+ assert.equal(battle.p1.active[1].getStat('atk'), battle.modify(baseAtk, 1.5));
+ assert.equal(battle.p1.active[1].getStat('spd'), battle.modify(baseSpd, 1.5));
});
it('should still work if Cherrim transforms into something with Flower Gift without originally having it', function () {
@@ -43,9 +43,9 @@ describe('Flower Gift', function () {
// Set the weather to sun and re-check
battle.field.setWeather('sunnyday', 'debug');
- assert.strictEqual(battle.p1.active[0].getStat('atk'), battle.modify(cherAtk, 1.5));
- assert.strictEqual(battle.p1.active[0].getStat('spd'), battle.modify(cherSpd, 1.5));
- assert.strictEqual(battle.p1.active[1].getStat('atk'), battle.modify(baseAtk, 1.5));
- assert.strictEqual(battle.p1.active[1].getStat('spd'), battle.modify(baseSpd, 1.5));
+ assert.equal(battle.p1.active[0].getStat('atk'), battle.modify(cherAtk, 1.5));
+ assert.equal(battle.p1.active[0].getStat('spd'), battle.modify(cherSpd, 1.5));
+ assert.equal(battle.p1.active[1].getStat('atk'), battle.modify(baseAtk, 1.5));
+ assert.equal(battle.p1.active[1].getStat('spd'), battle.modify(baseSpd, 1.5));
});
});
diff --git a/test/sim/abilities/immunity.js b/test/sim/abilities/immunity.js
index 57ae104dbe..e90749e466 100644
--- a/test/sim/abilities/immunity.js
+++ b/test/sim/abilities/immunity.js
@@ -31,7 +31,7 @@ describe('Immunity', function () {
battle.setPlayer('p1', {team: [{species: 'Snorlax', ability: 'immunity', moves: ['curse']}]});
battle.setPlayer('p2', {team: [{species: 'Crobat', ability: 'moldbreaker', moves: ['toxic']}]});
battle.makeChoices('move curse', 'move toxic');
- assert.strictEqual(battle.log.filter(line => line.match(/-status\|.*\|tox/)).length, 1);
- assert.strictEqual(battle.p1.active[0].status, '');
+ assert.equal(battle.log.filter(line => line.match(/-status\|.*\|tox/)).length, 1);
+ assert.equal(battle.p1.active[0].status, '');
});
});
diff --git a/test/sim/abilities/intimidate.js b/test/sim/abilities/intimidate.js
index 2dddda5e52..4f5b35bf4b 100644
--- a/test/sim/abilities/intimidate.js
+++ b/test/sim/abilities/intimidate.js
@@ -47,7 +47,7 @@ describe('Intimidate', function () {
battle.makeChoices('', 'switch 3, pass');
const activate = '|-ability|p2a: Gyarados|Intimidate|boost';
- assert.strictEqual(battle.log.filter(m => m === activate).length, 0);
+ assert.equal(battle.log.filter(m => m === activate).length, 0);
assert.statStage(battle.p1.active[0], 'atk', 0);
assert.statStage(battle.p1.active[1], 'atk', 0);
@@ -86,7 +86,7 @@ describe('Intimidate', function () {
intimidateCount++;
});
battle.makeChoices('default', 'default'); // Finish Team Preview, switch both Pokemon in
- assert.strictEqual(intimidateCount, 2);
+ assert.equal(intimidateCount, 2);
assert.statStage(battle.p1.active[0], 'atk', -1);
assert.statStage(battle.p2.active[0], 'atk', -1);
@@ -101,7 +101,7 @@ describe('Intimidate', function () {
intimidateCount++;
});
battle.makeChoices('default', 'default'); // Finish Team Preview, switch both Pokemon in
- assert.strictEqual(intimidateCount, 2);
+ assert.equal(intimidateCount, 2);
assert.statStage(battle.p1.active[0], 'atk', -1);
assert.statStage(battle.p2.active[0], 'atk', -1);
});
@@ -130,13 +130,13 @@ describe('Intimidate', function () {
battle.makeChoices('switch arcanine', 'switch gyarados');
// Both Pokemon switched in at the same time
- assert.strictEqual(intimidateCount, 2);
+ assert.equal(intimidateCount, 2);
assert.statStage(p1active[0], 'atk', -1);
assert.statStage(p2active[0], 'atk', -1);
// Do it again with the Pokemon in reverse order
battle.makeChoices('move healingwish', 'move healingwish');
battle.makeChoices('switch gyarados', 'switch arcanine');
- assert.strictEqual(intimidateCount, 4);
+ assert.equal(intimidateCount, 4);
assert.statStage(p1active[0], 'atk', -1);
assert.statStage(p2active[0], 'atk', -1);
});
diff --git a/test/sim/abilities/klutz.js b/test/sim/abilities/klutz.js
index 8088008c0c..b8d6d2b1e7 100644
--- a/test/sim/abilities/klutz.js
+++ b/test/sim/abilities/klutz.js
@@ -24,7 +24,7 @@ describe('Klutz', function () {
battle.setPlayer('p2', {team: [{species: "Deoxys", ability: 'noguard', moves: ['psychic']}]});
const klutzMon = battle.p1.active[0];
assert.constant(() => klutzMon.item, () => battle.makeChoices('move endure', 'move psychic'));
- assert.strictEqual(klutzMon.hp, 1);
+ assert.equal(klutzMon.hp, 1);
});
it('should ignore the effects of items that disable moves', function () {
@@ -32,7 +32,7 @@ describe('Klutz', function () {
battle.setPlayer('p1', {team: [{species: "Lopunny", ability: 'klutz', item: 'assaultvest', moves: ['protect']}]});
battle.setPlayer('p2', {team: [{species: "Deoxys", ability: 'noguard', moves: ['psychic']}]});
battle.makeChoices('move protect', 'move psychic');
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'protect');
+ assert.equal(battle.p1.active[0].lastMove.id, 'protect');
});
it('should not ignore item effects that prevent item removal', function () {
diff --git a/test/sim/abilities/levitate.js b/test/sim/abilities/levitate.js
index ac7a5d2415..081fef30fa 100644
--- a/test/sim/abilities/levitate.js
+++ b/test/sim/abilities/levitate.js
@@ -22,7 +22,7 @@ describe('Levitate', function () {
battle.setPlayer('p1', {team: [{species: 'Unown', ability: 'levitate', moves: ['spore']}]});
battle.setPlayer('p2', {team: [{species: 'Espeon', ability: 'magicbounce', moves: ['electricterrain']}]});
battle.makeChoices('move spore', 'move electricterrain');
- assert.strictEqual(battle.p1.active[0].status, 'slp', "Levitate Pokémon should not be awaken by Electric Terrain");
+ assert.equal(battle.p1.active[0].status, 'slp', "Levitate Pokémon should not be awaken by Electric Terrain");
});
it('should have its Ground immunity suppressed by Mold Breaker', function () {
diff --git a/test/sim/abilities/magicguard.js b/test/sim/abilities/magicguard.js
index c94cbdfa60..79cd2fd1d0 100644
--- a/test/sim/abilities/magicguard.js
+++ b/test/sim/abilities/magicguard.js
@@ -19,7 +19,7 @@ describe('Magic Guard', function () {
battle.setPlayer('p2', {team: [{species: 'Crobat', ability: 'roughskin', moves: ['spikes', 'toxic', 'protect']}]});
battle.makeChoices('move splash', 'move spikes');
battle.makeChoices('switch 2', 'move toxic');
- assert.strictEqual(battle.p1.active[0].status, 'tox');
+ assert.equal(battle.p1.active[0].status, 'tox');
assert.fullHP(battle.p1.active[0]);
battle.makeChoices('move mindblown', 'move toxic');
battle.makeChoices('move doubleedge', 'move spikes');
diff --git a/test/sim/abilities/multiscale.js b/test/sim/abilities/multiscale.js
index 077657d3eb..a2f4336265 100644
--- a/test/sim/abilities/multiscale.js
+++ b/test/sim/abilities/multiscale.js
@@ -21,7 +21,7 @@ describe('Multiscale', function () {
curhp = pokemon.hp;
battle.resetRNG();
battle.makeChoices('move splash', 'move incinerate');
- assert.strictEqual(damage, battle.modify(curhp - pokemon.hp, 0.5));
+ assert.equal(damage, battle.modify(curhp - pokemon.hp, 0.5));
});
it('should be suppressed by Mold Breaker', function () {
@@ -35,6 +35,6 @@ describe('Multiscale', function () {
curhp = pokemon.hp;
battle.resetRNG();
battle.makeChoices('move splash', 'move incinerate');
- assert.strictEqual(curhp - pokemon.hp, damage);
+ assert.equal(curhp - pokemon.hp, damage);
});
});
diff --git a/test/sim/abilities/mummy.js b/test/sim/abilities/mummy.js
index 30f33f3242..8f5d816c18 100644
--- a/test/sim/abilities/mummy.js
+++ b/test/sim/abilities/mummy.js
@@ -15,7 +15,7 @@ describe('Mummy', function () {
battle.setPlayer('p1', {team: [{species: 'Cofagrigus', ability: 'mummy', moves: ['calmmind']}]});
battle.setPlayer('p2', {team: [{species: 'Mew', ability: 'synchronize', moves: ['aerialace']}]});
battle.makeChoices('move calmmind', 'move aerialace');
- assert.strictEqual(battle.p2.active[0].ability, 'mummy');
+ assert.equal(battle.p2.active[0].ability, 'mummy');
});
it("should not change certain abilities", function () {
@@ -23,7 +23,7 @@ describe('Mummy', function () {
battle.setPlayer('p1', {team: [{species: 'Cofagrigus', ability: 'mummy', moves: ['calmmind']}]});
battle.setPlayer('p2', {team: [{species: 'Greninja', ability: 'battlebond', moves: ['aerialace']}]});
battle.makeChoices('move calmmind', 'move aerialace');
- assert.strictEqual(battle.p2.active[0].ability, 'battlebond');
+ assert.equal(battle.p2.active[0].ability, 'battlebond');
});
it(`should not activate before all damage calculation is complete`, function () {
diff --git a/test/sim/abilities/neutralizinggas.js b/test/sim/abilities/neutralizinggas.js
index 220926f66a..5db5d1c22d 100644
--- a/test/sim/abilities/neutralizinggas.js
+++ b/test/sim/abilities/neutralizinggas.js
@@ -59,7 +59,7 @@ describe('Neutralizing Gas', function () {
battle.makeChoices('move toxic', 'move uturn');
battle.makeChoices('', 'switch 2');
battle.makeChoices('switch 2', 'switch 2');
- assert.strictEqual(battle.p2.active[0].status, 'tox');
+ assert.equal(battle.p2.active[0].status, 'tox');
});
it('should negate abilities that modify move type', function () {
diff --git a/test/sim/abilities/parentalbond.js b/test/sim/abilities/parentalbond.js
index b22cfdc515..19cc4f0d8e 100644
--- a/test/sim/abilities/parentalbond.js
+++ b/test/sim/abilities/parentalbond.js
@@ -25,17 +25,17 @@ describe('Parental Bond', function () {
it('should cause single-hit attacks to strike twice, with the second hit at 0.25 power', function () {
battle.makeChoices('move falseswipe', 'move rest');
- assert.deepStrictEqual(basePowers, [40, 10]);
+ assert.deepEqual(basePowers, [40, 10]);
});
it('should not have any effect on moves with multiple hits', function () {
battle.makeChoices('move doublehit', 'move rest');
- assert.deepStrictEqual(basePowers, [35, 35]);
+ assert.deepEqual(basePowers, [35, 35]);
});
it('should not have any effect Z-Moves', function () {
battle.makeChoices('move falseswipe zmove', 'move rest');
- assert.deepStrictEqual(basePowers, [100]);
+ assert.deepEqual(basePowers, [100]);
});
});
@@ -58,11 +58,11 @@ describe('Parental Bond [Gen 6]', function () {
it('should cause single-hit attacks to strike twice, with the second hit at 0.5 power', function () {
battle.makeChoices('move falseswipe', 'move rest');
- assert.deepStrictEqual(basePowers, [40, 20]);
+ assert.deepEqual(basePowers, [40, 20]);
});
it('should not have any effect on moves with multiple hits', function () {
battle.makeChoices('move doublehit', 'move rest');
- assert.deepStrictEqual(basePowers, [35, 35]);
+ assert.deepEqual(basePowers, [35, 35]);
});
});
diff --git a/test/sim/abilities/pickpocket.js b/test/sim/abilities/pickpocket.js
index d74be3f86d..4c99cbe058 100644
--- a/test/sim/abilities/pickpocket.js
+++ b/test/sim/abilities/pickpocket.js
@@ -39,7 +39,7 @@ describe('Pickpocket', function () {
battle.makeChoices('move agility', 'move quickattack');
assert.holdsItem(battle.p1.active[0], "The foe should have their item stolen");
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
it('should not steal a foe\'s item if forced to switch out', function () {
diff --git a/test/sim/abilities/pressure.js b/test/sim/abilities/pressure.js
index 8b99086ed7..750f138007 100644
--- a/test/sim/abilities/pressure.js
+++ b/test/sim/abilities/pressure.js
@@ -17,8 +17,8 @@ describe('Pressure', function () {
]);
battle.makeChoices('move rest, move peck -1', 'move rest, move peck 1');
let move = Dex.getMove('peck');
- assert.strictEqual(battle.p1.active[1].getMoveData(move).pp, 55);
- assert.strictEqual(battle.p2.active[1].getMoveData(move).pp, 54);
+ assert.equal(battle.p1.active[1].getMoveData(move).pp, 55);
+ assert.equal(battle.p2.active[1].getMoveData(move).pp, 54);
});
it('should deduct PP if moves are redirected to the user', function () {
@@ -31,8 +31,8 @@ describe('Pressure', function () {
]]);
battle.makeChoices('move followme, move peck 2', 'move followme, move peck 2');
let move = Dex.getMove('peck');
- assert.strictEqual(battle.p1.active[1].getMoveData(move).pp, 55);
- assert.strictEqual(battle.p2.active[1].getMoveData(move).pp, 54);
+ assert.equal(battle.p1.active[1].getMoveData(move).pp, 55);
+ assert.equal(battle.p2.active[1].getMoveData(move).pp, 54);
});
it('should deduct PP even if the move fails or misses', function () {
@@ -40,13 +40,13 @@ describe('Pressure', function () {
battle.setPlayer('p1', {team: [{species: "Giratina", ability: 'pressure', item: 'laggingtail', moves: ['mistyterrain', 'shadowforce']}]});
battle.setPlayer('p2', {team: [{species: "Smeargle", ability: 'desolateland', moves: ['doubleedge', 'spore', 'moonblast', 'surf']}]});
battle.makeChoices('auto', 'auto');
- assert.strictEqual(battle.p2.active[0].getMoveData(Dex.getMove('doubleedge')).pp, 22);
+ assert.equal(battle.p2.active[0].getMoveData(Dex.getMove('doubleedge')).pp, 22);
battle.makeChoices('move shadowforce', 'move spore');
- assert.strictEqual(battle.p2.active[0].getMoveData(Dex.getMove('spore')).pp, 22);
+ assert.equal(battle.p2.active[0].getMoveData(Dex.getMove('spore')).pp, 22);
battle.makeChoices('auto', 'move moonblast');
- assert.strictEqual(battle.p2.active[0].getMoveData(Dex.getMove('moonblast')).pp, 22);
+ assert.equal(battle.p2.active[0].getMoveData(Dex.getMove('moonblast')).pp, 22);
battle.makeChoices('auto', 'move surf');
- assert.strictEqual(battle.p2.active[0].getMoveData(Dex.getMove('surf')).pp, 22);
+ assert.equal(battle.p2.active[0].getMoveData(Dex.getMove('surf')).pp, 22);
});
it('should deduct PP for each Pressure Pokemon targetted', function () {
@@ -63,9 +63,9 @@ describe('Pressure', function () {
{species: "Reshiram", ability: 'turboblaze', moves: ['rockslide']},
]});
battle.makeChoices('move rest, move rest, move rest', 'move hail, move spikes, move rockslide');
- assert.strictEqual(battle.p2.active[0].getMoveData(Dex.getMove('hail')).pp, 12);
- assert.strictEqual(battle.p2.active[1].getMoveData(Dex.getMove('spikes')).pp, 28);
- assert.strictEqual(battle.p2.active[2].getMoveData(Dex.getMove('rockslide')).pp, 13);
+ assert.equal(battle.p2.active[0].getMoveData(Dex.getMove('hail')).pp, 12);
+ assert.equal(battle.p2.active[1].getMoveData(Dex.getMove('spikes')).pp, 28);
+ assert.equal(battle.p2.active[2].getMoveData(Dex.getMove('rockslide')).pp, 13);
});
it('should deduct PP for each opposing Pressure Pokemon when Snatch of Imprison are used', function () {
@@ -82,8 +82,8 @@ describe('Pressure', function () {
{species: "Reshiram", ability: 'turboblaze', moves: ['rest']},
]});
battle.makeChoices('move rest, move rest, move rest', 'move snatch, move imprison, move rest');
- assert.strictEqual(battle.p2.active[0].getMoveData(Dex.getMove('snatch')).pp, 12);
- assert.strictEqual(battle.p2.active[1].getMoveData(Dex.getMove('imprison')).pp, 12);
+ assert.equal(battle.p2.active[0].getMoveData(Dex.getMove('snatch')).pp, 12);
+ assert.equal(battle.p2.active[1].getMoveData(Dex.getMove('imprison')).pp, 12);
});
});
@@ -99,8 +99,8 @@ describe('Pressure [Gen 4]', function () {
]);
battle.makeChoices('move rest, move peck -1', 'move rest, move peck 1');
let move = Dex.getMove('peck');
- assert.strictEqual(battle.p1.active[1].getMoveData(move).pp, 54);
- assert.strictEqual(battle.p2.active[1].getMoveData(move).pp, 54);
+ assert.equal(battle.p1.active[1].getMoveData(move).pp, 54);
+ assert.equal(battle.p2.active[1].getMoveData(move).pp, 54);
});
it('should deduct PP if moves are redirected to the user', function () {
@@ -110,8 +110,8 @@ describe('Pressure [Gen 4]', function () {
]);
battle.makeChoices('move followme, move peck 2', 'move followme, move peck 2');
let move = Dex.getMove('peck');
- assert.strictEqual(battle.p1.active[1].getMoveData(move).pp, 55);
- assert.strictEqual(battle.p2.active[1].getMoveData(move).pp, 54);
+ assert.equal(battle.p1.active[1].getMoveData(move).pp, 55);
+ assert.equal(battle.p2.active[1].getMoveData(move).pp, 54);
});
it('should deduct PP even if the move fails or misses', function () {
@@ -121,9 +121,9 @@ describe('Pressure [Gen 4]', function () {
]);
const attacker = battle.p2.active[0];
battle.makeChoices('move shadowforce', 'move doubleedge');
- assert.strictEqual(attacker.getMoveData(Dex.getMove('doubleedge')).pp, 22);
+ assert.equal(attacker.getMoveData(Dex.getMove('doubleedge')).pp, 22);
battle.makeChoices('move shadowforce', 'move dragonpulse');
- assert.strictEqual(attacker.getMoveData(Dex.getMove('dragonpulse')).pp, 14);
+ assert.equal(attacker.getMoveData(Dex.getMove('dragonpulse')).pp, 14);
});
it('should deduct PP for each Pressure Pokemon targetted', function () {
@@ -132,8 +132,8 @@ describe('Pressure [Gen 4]', function () {
[{species: "Lugia", ability: 'pressure', moves: ['hail']}, {species: "Ho-Oh", ability: 'pressure', moves: ['earthquake']}],
]);
battle.makeChoices('move rest, move rest', 'move hail, move earthquake');
- assert.strictEqual(battle.p2.active[0].getMoveData(Dex.getMove('hail')).pp, 12);
- assert.strictEqual(battle.p2.active[1].getMoveData(Dex.getMove('earthquake')).pp, 12);
+ assert.equal(battle.p2.active[0].getMoveData(Dex.getMove('hail')).pp, 12);
+ assert.equal(battle.p2.active[1].getMoveData(Dex.getMove('earthquake')).pp, 12);
});
it('should not deduct PP from self-targeting moves', function () {
@@ -143,7 +143,7 @@ describe('Pressure [Gen 4]', function () {
]);
battle.makeChoices('move calmmind', 'move calmmind');
let move = Dex.getMove('calmmind');
- assert.strictEqual(battle.p1.active[0].getMoveData(move).pp, 31);
- assert.strictEqual(battle.p1.active[0].getMoveData(move).pp, 31);
+ assert.equal(battle.p1.active[0].getMoveData(move).pp, 31);
+ assert.equal(battle.p1.active[0].getMoveData(move).pp, 31);
});
});
diff --git a/test/sim/abilities/primordialsea.js b/test/sim/abilities/primordialsea.js
index 358ec25681..55bb95adf3 100644
--- a/test/sim/abilities/primordialsea.js
+++ b/test/sim/abilities/primordialsea.js
@@ -27,7 +27,7 @@ describe('Primordial Sea', function () {
assert.hurtsBy(defender, 104, () => battle.makeChoices('move waterpledge', 'move splash'));
const move = Dex.getMove('waterpledge');
const basePower = battle.runEvent('BasePower', attacker, defender, move, move.basePower, true);
- assert.strictEqual(basePower, move.basePower);
+ assert.equal(basePower, move.basePower);
});
it('should cause Fire-type attacks to fail', function () {
@@ -75,21 +75,21 @@ describe('Primordial Sea', function () {
]});
battle.onEvent('Hit', battle.format, (target, pokemon, move) => {
if (move.id === 'weatherball') {
- assert.strictEqual(move.type, 'Water');
+ assert.equal(move.type, 'Water');
}
});
const myActive = battle.p2.active;
battle.makeChoices('move sonicboom', 'move weatherball');
assert.species(myActive[0], 'Castform-Rainy');
battle.makeChoices('move sonicboom', 'switch 2');
- assert.strictEqual(myActive[0].getStat('spe'), 2 * myActive[0].storedStats['spe'], "Kingdra's Speed should be doubled by Swift Swim");
+ assert.equal(myActive[0].getStat('spe'), 2 * myActive[0].storedStats['spe'], "Kingdra's Speed should be doubled by Swift Swim");
battle.makeChoices('move sonicboom', 'switch 3');
assert.notStrictEqual(myActive[0].maxhp - myActive[0].hp, 20);
battle.makeChoices('move sonicboom', 'switch 4');
assert.notStrictEqual(myActive[0].maxhp - myActive[0].hp, 20);
battle.makeChoices('move sonicboom', 'switch 5');
battle.makeChoices('move sonicboom', 'move rest');
- assert.strictEqual(myActive[0].status, '');
+ assert.equal(myActive[0].status, '');
});
it('should cause the Primordial Sea weather to fade if it switches out and no other Primordial Sea Pokemon are active', function () {
diff --git a/test/sim/abilities/roughskin.js b/test/sim/abilities/roughskin.js
index 01827ca15b..27d2072f7b 100644
--- a/test/sim/abilities/roughskin.js
+++ b/test/sim/abilities/roughskin.js
@@ -17,6 +17,6 @@ describe('Rough Skin', function () {
battle.setPlayer('p2', {team: [{species: 'Pachirisu', ability: 'voltabsorb', moves: ['nuzzle']}]});
battle.makeChoices('auto', 'move nuzzle');
const pachi = battle.p2.active[0];
- assert.strictEqual(pachi.hp, Math.ceil(pachi.maxhp - pachi.maxhp / 8));
+ assert.equal(pachi.hp, Math.ceil(pachi.maxhp - pachi.maxhp / 8));
});
});
diff --git a/test/sim/abilities/sheerforce.js b/test/sim/abilities/sheerforce.js
index dcbc7db910..8c0b84c8dc 100644
--- a/test/sim/abilities/sheerforce.js
+++ b/test/sim/abilities/sheerforce.js
@@ -15,7 +15,7 @@ describe('Sheer Force', function () {
battle.setPlayer('p1', {team: [{species: 'Tauros', ability: 'sheerforce', item: 'lifeorb', moves: ['earthquake']}]});
battle.setPlayer('p2', {team: [{species: 'Lapras', ability: 'shellarmor', item: 'laggingtail', moves: ['rest']}]});
battle.makeChoices('move earthquake', 'move rest');
- assert.strictEqual(battle.p1.active[0].hp, 262);
+ assert.equal(battle.p1.active[0].hp, 262);
});
it('should eliminate secondary effects from moves', function () {
@@ -23,7 +23,7 @@ describe('Sheer Force', function () {
battle.setPlayer('p1', {team: [{species: 'Tauros', ability: 'sheerforce', moves: ['zapcannon']}]});
battle.setPlayer('p2', {team: [{species: 'Machamp', ability: 'noguard', moves: ['bulkup']}]});
battle.makeChoices('move zapcannon', 'move bulkup');
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
});
it('should not eliminate Life Orb recoil if the ability is disabled/removed mid-attack', function () {
@@ -33,7 +33,7 @@ describe('Sheer Force', function () {
battle.makeChoices('move lockon', 'move irondefense');
battle.makeChoices('move dynamicpunch', 'move irondefense');
assert.false(battle.p2.active[0].volatiles['confusion']);
- assert.strictEqual(battle.p1.active[0].hp, 262);
+ assert.equal(battle.p1.active[0].hp, 262);
});
it('should eliminate Life Orb recoil in a move with secondary effects', function () {
@@ -41,6 +41,6 @@ describe('Sheer Force', function () {
battle.setPlayer('p1', {team: [{species: 'Tauros', ability: 'sheerforce', item: 'lifeorb', moves: ['bodyslam']}]});
battle.setPlayer('p2', {team: [{species: 'Lapras', ability: 'shellarmor', item: 'laggingtail', moves: ['rest']}]});
battle.makeChoices('move bodyslam', 'move rest');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
});
diff --git a/test/sim/abilities/simple.js b/test/sim/abilities/simple.js
index c268b5ee83..9c861a2f75 100644
--- a/test/sim/abilities/simple.js
+++ b/test/sim/abilities/simple.js
@@ -44,8 +44,8 @@ describe('Simple [Gen 4]', function () {
]);
battle.makeChoices('move batonpass', 'move splash');
battle.makeChoices('switch 2', '');
- assert.strictEqual(battle.p1.active[0].boosts['atk'], -1);
- assert.strictEqual(battle.p1.active[0].getStat('atk'), Math.floor(0.5 * battle.p1.active[0].getStat('atk', true)));
+ assert.equal(battle.p1.active[0].boosts['atk'], -1);
+ assert.equal(battle.p1.active[0].getStat('atk'), Math.floor(0.5 * battle.p1.active[0].getStat('atk', true)));
});
it('should be suppressed by Mold Breaker', function () {
diff --git a/test/sim/abilities/stickyhold.js b/test/sim/abilities/stickyhold.js
index d89e9c0ba7..1ae75d843a 100644
--- a/test/sim/abilities/stickyhold.js
+++ b/test/sim/abilities/stickyhold.js
@@ -21,7 +21,7 @@ describe('Sticky Hold', function () {
]});
const itemHolder = battle.p1.active[0];
battle.makeChoices('move recover', 'move grassknot');
- assert.strictEqual(itemHolder.item, 'razzberry', "Shuckle should hold a Razz Berry");
+ assert.equal(itemHolder.item, 'razzberry', "Shuckle should hold a Razz Berry");
battle.makeChoices('move recover', 'switch 2');
for (const moveid of STEAL_MOVES) {
diff --git a/test/sim/abilities/sturdy.js b/test/sim/abilities/sturdy.js
index bcda0f5162..06649203d6 100644
--- a/test/sim/abilities/sturdy.js
+++ b/test/sim/abilities/sturdy.js
@@ -22,7 +22,7 @@ describe('Sturdy', function () {
battle.setPlayer('p1', {team: [{species: 'Paras', ability: 'sturdy', moves: ['sleeptalk']}]});
battle.setPlayer('p2', {team: [{species: 'Charizard', ability: 'drought', moves: ['fusionflare']}]});
battle.makeChoices('move sleeptalk', 'move fusionflare');
- assert.strictEqual(battle.p1.active[0].hp, 1);
+ assert.equal(battle.p1.active[0].hp, 1);
});
it('should allow its user to survive a confusion damage hit from full HP', function () {
@@ -30,7 +30,7 @@ describe('Sturdy', function () {
battle.setPlayer('p1', {team: [{species: 'Shedinja', ability: 'sturdy', moves: ['absorb']}]});
battle.setPlayer('p2', {team: [{species: 'Klefki', ability: 'prankster', moves: ['confuseray']}]});
battle.makeChoices('move absorb', 'move confuseray');
- assert.strictEqual(battle.p1.active[0].hp, 1);
+ assert.equal(battle.p1.active[0].hp, 1);
});
it('should not trigger on recoil damage', function () {
diff --git a/test/sim/abilities/suctioncups.js b/test/sim/abilities/suctioncups.js
index a540d1c96e..affd2ce274 100644
--- a/test/sim/abilities/suctioncups.js
+++ b/test/sim/abilities/suctioncups.js
@@ -20,10 +20,10 @@ describe('Suction Cups', function () {
const [cupsMon, redCardHolder] = [battle.p1.active[0], battle.p2.active[0]];
battle.makeChoices('move rapidspin', 'move healpulse');
assert.false.holdsItem(redCardHolder, "Red Card should activate");
- assert.strictEqual(cupsMon, battle.p1.active[0]);
+ assert.equal(cupsMon, battle.p1.active[0]);
for (let i = 2; i <= 4; i++) {
battle.makeChoices('move rapidspin', 'move ' + i);
- assert.strictEqual(cupsMon, battle.p1.active[0]);
+ assert.equal(cupsMon, battle.p1.active[0]);
}
});
diff --git a/test/sim/abilities/symbiosis.js b/test/sim/abilities/symbiosis.js
index 4befcfc127..a968e9a299 100644
--- a/test/sim/abilities/symbiosis.js
+++ b/test/sim/abilities/symbiosis.js
@@ -16,8 +16,8 @@ describe('Symbiosis', function () {
[{species: 'Smeargle', moves: ['snarl']}, {species: 'Smeargle', moves: ['snarl']}],
]);
battle.makeChoices('move snarl, move snarl', 'move snarl, move snarl');
- assert.strictEqual(battle.p1.active[0].item, '');
- assert.strictEqual(battle.p1.active[1].item, '');
+ assert.equal(battle.p1.active[0].item, '');
+ assert.equal(battle.p1.active[1].item, '');
});
it('should not share an item required to change forme', function () {
@@ -26,7 +26,7 @@ describe('Symbiosis', function () {
[{species: 'Smeargle', moves: ['snarl']}, {species: 'Smeargle', moves: ['snarl']}],
]);
battle.makeChoices('move snarl, move snarl', 'move snarl, move snarl');
- assert.strictEqual(battle.p1.active[0].item, 'latiasite');
- assert.strictEqual(battle.p1.active[1].item, '');
+ assert.equal(battle.p1.active[0].item, 'latiasite');
+ assert.equal(battle.p1.active[1].item, '');
});
});
diff --git a/test/sim/abilities/unaware.js b/test/sim/abilities/unaware.js
index 45ac403f9f..7d672df040 100644
--- a/test/sim/abilities/unaware.js
+++ b/test/sim/abilities/unaware.js
@@ -21,7 +21,7 @@ describe('Unaware', function () {
battle.makeChoices('move softboiled', 'move bellydrum');
battle.resetRNG();
battle.makeChoices('move softboiled', 'move vitalthrow');
- assert.strictEqual(pokemon.maxhp - pokemon.hp, damage);
+ assert.equal(pokemon.maxhp - pokemon.hp, damage);
});
it('should not ignore attack stage changes when Pokemon with it attack', function () {
@@ -49,7 +49,7 @@ describe('Unaware', function () {
pokemon.hp = pokemon.maxhp;
battle.resetRNG();
battle.makeChoices('move moonblast', 'move amnesia');
- assert.strictEqual(pokemon.maxhp - pokemon.hp, damage);
+ assert.equal(pokemon.maxhp - pokemon.hp, damage);
});
it('should not ignore defense stage changes when Pokemon with it are attacked', function () {
diff --git a/test/sim/abilities/unburden.js b/test/sim/abilities/unburden.js
index aba43368d9..4254cc3dba 100644
--- a/test/sim/abilities/unburden.js
+++ b/test/sim/abilities/unburden.js
@@ -64,8 +64,8 @@ describe('Unburden', function () {
battle.setPlayer('p2', {team: [{species: 'Togekiss', ability: 'serenegrace', item: 'laggingtail', moves: ['bestow', 'followme']}]});
const originalSpeed = battle.p1.active[0].getStat('spe');
battle.makeChoices('move machpunch', 'move followme');
- assert.strictEqual(battle.p1.active[0].getStat('spe'), 2 * originalSpeed);
+ assert.equal(battle.p1.active[0].getStat('spe'), 2 * originalSpeed);
battle.makeChoices('move machpunch', 'move bestow');
- assert.strictEqual(battle.p1.active[0].getStat('spe'), originalSpeed);
+ assert.equal(battle.p1.active[0].getStat('spe'), originalSpeed);
});
});
diff --git a/test/sim/abilities/wonderguard.js b/test/sim/abilities/wonderguard.js
index be29f450ba..7bdd0b8d1b 100644
--- a/test/sim/abilities/wonderguard.js
+++ b/test/sim/abilities/wonderguard.js
@@ -16,7 +16,7 @@ describe('Wonder Guard', function () {
battle.setPlayer('p2', {team: [{species: "Smeargle", ability: 'owntempo', moves: ['knockoff', 'flamethrower', 'thousandarrows', 'moonblast']}]});
for (let i = 1; i <= 4; i++) {
battle.makeChoices('move sleeptalk', 'move ' + i);
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
}
// Thousand Arrows shouldn't add the Smack Down volatile if blocked by Wonder Guard
assert.false.hurts(battle.p1.active[0], () => battle.makeChoices('move sleeptalk', 'move thousandarrows'));
@@ -28,7 +28,7 @@ describe('Wonder Guard', function () {
battle.setPlayer('p2', {team: [{species: "Smeargle", ability: 'noguard', moves: ['poisongas', 'screech', 'healpulse', 'gastroacid']}]});
const wwTarget = battle.p1.active[0];
battle.makeChoices('move teleport', 'move poisongas');
- assert.strictEqual(wwTarget.status, 'psn');
+ assert.equal(wwTarget.status, 'psn');
battle.makeChoices('move teleport', 'move screech');
assert.statStage(wwTarget, 'def', -2);
assert.hurtsBy(wwTarget, -Math.floor(wwTarget.maxhp / 8), () => battle.makeChoices('move teleport', 'move healpulse'));
diff --git a/test/sim/choice-parser.js b/test/sim/choice-parser.js
index a4832557d3..3595158bdc 100644
--- a/test/sim/choice-parser.js
+++ b/test/sim/choice-parser.js
@@ -187,14 +187,14 @@ describe('Choice parser', function () {
]});
assert(battle.choose('p1', `move 1, move Conversion 2 2`));
- assert.strictEqual(battle.p1.getChoice(), `move conversion, move conversion2 2`);
+ assert.equal(battle.p1.getChoice(), `move conversion, move conversion2 2`);
battle.p1.clearChoice();
assert.throws(() => battle.choose('p1', `move 1, move Conversion -2`));
battle.p1.clearChoice();
assert(battle.choose('p1', `move Conversion 2 zmove 2, move 1`));
- assert.strictEqual(battle.p1.getChoice(), `move conversion2 2 zmove, move conversion`);
+ assert.equal(battle.p1.getChoice(), `move conversion2 2 zmove, move conversion`);
battle.p1.clearChoice();
});
});
@@ -245,7 +245,7 @@ describe('Choice parser', function () {
assert.false.fainted(p1.active[1]);
assert(battle.choose('p1', 'move smog 2'));
- assert.strictEqual(battle.p1.getChoice(), `pass, move smog 2`, `Choice mismatch`);
+ assert.equal(battle.p1.getChoice(), `pass, move smog 2`, `Choice mismatch`);
});
});
@@ -361,16 +361,16 @@ describe('Choice parser', function () {
const validChoices = ['move spikes', 'move 1'];
for (const action of validChoices) {
battle.choose('p1', action);
- assert.strictEqual(battle.p1.getChoice(), `pass, move spikes, pass`);
+ assert.equal(battle.p1.getChoice(), `pass, move spikes, pass`);
battle.p1.clearChoice();
battle.choose('p1', `pass, ${action}, pass`);
- assert.strictEqual(battle.p1.getChoice(), `pass, move spikes, pass`);
+ assert.equal(battle.p1.getChoice(), `pass, move spikes, pass`);
battle.p1.clearChoice();
battle.choose('p1', `pass, ${action}`);
- assert.strictEqual(battle.p1.getChoice(), `pass, move spikes, pass`);
+ assert.equal(battle.p1.getChoice(), `pass, move spikes, pass`);
battle.p1.clearChoice();
battle.choose('p1', `${action}, pass`);
- assert.strictEqual(battle.p1.getChoice(), `pass, move spikes, pass`);
+ assert.equal(battle.p1.getChoice(), `pass, move spikes, pass`);
battle.p1.clearChoice();
}
});
diff --git a/test/sim/decisions.js b/test/sim/decisions.js
index 72c5030543..fdfcdbd1ad 100644
--- a/test/sim/decisions.js
+++ b/test/sim/decisions.js
@@ -114,7 +114,7 @@ describe('Choices', function () {
}, 20);
setTimeout(() => {
battle.choose('p1', 'move 1');
- assert.strictEqual(battle.turn, 2);
+ assert.equal(battle.turn, 2);
done();
}, 40);
});
@@ -134,21 +134,21 @@ describe('Choices', function () {
const beforeHP = activeMons.map(pokemon => pokemon.hp);
const beforeAtk = activeMons.map(pokemon => pokemon.boosts.atk);
battle.makeChoices('move ' + (i + 1), 'move ' + (j + 1));
- assert.strictEqual(activeMons[0].lastMove.id, MOVES[0][i]);
- assert.strictEqual(activeMons[1].lastMove.id, MOVES[1][j]);
+ assert.equal(activeMons[0].lastMove.id, MOVES[0][i]);
+ assert.equal(activeMons[1].lastMove.id, MOVES[1][j]);
if (i >= 1) { // p1 used a damaging move
assert.atMost(activeMons[1].hp, beforeHP[1] - 1);
assert.statStage(activeMons[1], beforeAtk[1]);
} else {
- assert.strictEqual(activeMons[1].hp, beforeHP[1]);
+ assert.equal(activeMons[1].hp, beforeHP[1]);
assert.statStage(activeMons[1], beforeAtk[1] - 1);
}
if (j >= 1) { // p2 used a damaging move
assert.atMost(activeMons[0].hp, beforeHP[0] - 1);
assert.statStage(activeMons[0], beforeAtk[0]);
} else {
- assert.strictEqual(activeMons[0].hp, beforeHP[0]);
+ assert.equal(activeMons[0].hp, beforeHP[0]);
assert.statStage(activeMons[0], beforeAtk[0] - 1);
}
}
@@ -163,12 +163,12 @@ describe('Choices', function () {
const p2active = battle.p2.active;
battle.makeChoices('move gastroacid 1, move leechseed 2', 'move knockoff -2, move thunderwave -1');
- assert.strictEqual(battle.turn, 2);
+ assert.equal(battle.turn, 2);
assert(p2active[0].volatiles['gastroacid']);
assert(p2active[1].volatiles['leechseed']);
assert.false.holdsItem(p2active[1]);
- assert.strictEqual(p2active[0].status, 'par');
+ assert.equal(p2active[0].status, 'par');
});
it('should disallow specifying move targets for targetless moves (randomNormal)', function () {
@@ -282,8 +282,8 @@ describe('Choices', function () {
assert.cantMove(() => battle.makeChoices('move recover', 'move sketch'), 'Rhydon', 'Sketch');
battle.makeChoices('move recover', 'move 1');
- assert.strictEqual(battle.turn, 3);
- assert.strictEqual(battle.p2.active[0].lastMove.id, 'struggle');
+ assert.equal(battle.turn, 3);
+ assert.equal(battle.p2.active[0].lastMove.id, 'struggle');
});
it('should not force Struggle usage on move attempt for valid moves', function () {
@@ -293,7 +293,7 @@ describe('Choices', function () {
battle.makeChoices('move recover', 'move surf');
- assert.strictEqual(battle.turn, 2);
+ assert.equal(battle.turn, 2);
assert.notStrictEqual(battle.p2.active[0].lastMove.id, 'struggle');
});
@@ -305,11 +305,11 @@ describe('Choices', function () {
battle.p2.chooseMove(1);
assert.cantMove(() => battle.p1.chooseMove(1), 'Mew', 'Recover', true);
- assert.strictEqual(battle.turn, 1);
+ assert.equal(battle.turn, 1);
assert.notStrictEqual(failingAttacker.lastMove && failingAttacker.lastMove.id, 'struggle');
assert.cantMove(() => battle.p1.chooseMove(1), 'Mew', 'Recover');
- assert.strictEqual(battle.turn, 1);
+ assert.equal(battle.turn, 1);
assert.notStrictEqual(failingAttacker.lastMove && failingAttacker.lastMove.id, 'struggle');
});
@@ -380,7 +380,7 @@ describe('Choices', function () {
]]);
battle.makeChoices('move lunardance, move lunardance', 'move lunardance, move lunardance');
- assert.strictEqual(battle.getAllActive().length, 0, `All active Pok\u00E9mon should have fainted`);
+ assert.equal(battle.getAllActive().length, 0, `All active Pok\u00E9mon should have fainted`);
battle.makeChoices('pass, switch 3', 'switch 3, pass');
@@ -435,7 +435,7 @@ describe('Choices', function () {
]]);
battle.makeChoices('move lunardance, move lunardance', 'move lunardance, move lunardance');
- assert.strictEqual(battle.getAllActive().length, 0, `All active Pok\u00E9mon should have fainted`);
+ assert.equal(battle.getAllActive().length, 0, `All active Pok\u00E9mon should have fainted`);
assert.constant(() => battle.turn, () => {
assert.throws(() => battle.p1.choosePass(),
@@ -450,7 +450,7 @@ describe('Choices', function () {
);
});
- assert.strictEqual(battle.getAllActive().length, 0, `All active Pok\u00E9mon should have fainted`);
+ assert.equal(battle.getAllActive().length, 0, `All active Pok\u00E9mon should have fainted`);
});
});
@@ -724,9 +724,9 @@ describe('Choice extensions', function () {
if (mode === 'revoke') battle.undoChoice('p1');
battle.choose('p1', 'move growl');
- assert.strictEqual(battle.turn, 2);
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'tackle');
- assert.strictEqual(battle.p2.active[0].lastMove.id, 'growl');
+ assert.equal(battle.turn, 2);
+ assert.equal(battle.p1.active[0].lastMove.id, 'tackle');
+ assert.equal(battle.p2.active[0].lastMove.id, 'growl');
});
it(`should support to ${mode} move decisions`, function () {
@@ -739,8 +739,8 @@ describe('Choice extensions', function () {
if (mode === 'revoke') battle.undoChoice('p1');
battle.makeChoices('move growl', 'move growl');
- assert.strictEqual(battle.turn, 2);
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'growl');
+ assert.equal(battle.turn, 2);
+ assert.equal(battle.p1.active[0].lastMove.id, 'growl');
});
it(`should disallow to ${mode} move decisions for maybe-disabled Pokémon`, function () {
@@ -759,7 +759,7 @@ describe('Choice extensions', function () {
assert.cantUndo(() => battle.choose('p1', 'move growl'));
battle.choose('p2', 'move scratch');
- assert.strictEqual(target.lastMove.id, 'tackle');
+ assert.equal(target.lastMove.id, 'tackle');
});
it(`should disallow to ${mode} move decisions by default`, function () {
@@ -773,9 +773,9 @@ describe('Choice extensions', function () {
assert.cantUndo(() => battle.choose('p1', 'move growl'));
battle.choose('p2', 'move growl');
- assert.strictEqual(battle.turn, 2);
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'tackle');
- assert.strictEqual(battle.p2.active[0].lastMove.id, 'growl');
+ assert.equal(battle.turn, 2);
+ assert.equal(battle.p1.active[0].lastMove.id, 'tackle');
+ assert.equal(battle.p2.active[0].lastMove.id, 'growl');
});
it(`should support to ${mode} switch decisions on move requests`, function () {
@@ -796,7 +796,7 @@ describe('Choice extensions', function () {
for (const [index, species] of ['Bulbasaur', 'Ivysaur', 'Venusaur'].entries()) {
assert.species(battle.p1.pokemon[index], species);
}
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'synthesis');
+ assert.equal(battle.p1.active[0].lastMove.id, 'synthesis');
battle.destroy();
battle = common.createBattle({cancel: true}, TEAMS);
@@ -850,7 +850,7 @@ describe('Choice extensions', function () {
// The real Gengar comes in, but p1 only sees a Gengar being switched by another Gengar, implying Illusion.
// For a naive client, Starmie turns into Ghost/Poison, and it will be correct.
- assert.strictEqual(target.getTypes().join('/'), 'Ghost/Poison');
+ assert.equal(target.getTypes().join('/'), 'Ghost/Poison');
// Trapping with Gengar-Mega is a guaranteed trapping, so we are going to get a very meta
// Competitive Gothitelle into the battle field (Frisk is revealed on switch-in).
@@ -922,7 +922,7 @@ describe('Choice extensions', function () {
for (const [index, species] of ['Bulbasaur', 'Ivysaur', 'Venusaur'].entries()) {
assert.species(battle.p1.active[index], species);
}
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'synthesis');
+ assert.equal(battle.p1.active[0].lastMove.id, 'synthesis');
battle.destroy();
battle = common.gen(5).createBattle({gameType: 'triples', cancel: true}, TEAMS);
@@ -935,7 +935,7 @@ describe('Choice extensions', function () {
for (const [index, species] of ['Bulbasaur', 'Ivysaur', 'Venusaur'].entries()) {
assert.species(battle.p1.active[index], species);
}
- assert.strictEqual(battle.p1.active[2].lastMove.id, 'synthesis');
+ assert.equal(battle.p1.active[2].lastMove.id, 'synthesis');
});
it(`should disallow to ${mode} shift decisions by default`, function () {
@@ -959,7 +959,7 @@ describe('Choice extensions', function () {
for (const [index, species] of ['Ivysaur', 'Bulbasaur', 'Venusaur'].entries()) {
assert.species(battle.p1.active[index], species);
}
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'growth');
+ assert.equal(battle.p1.active[0].lastMove.id, 'growth');
battle.destroy();
battle = common.gen(5).createBattle({gameType: 'triples'}, TEAMS);
@@ -973,7 +973,7 @@ describe('Choice extensions', function () {
for (const [index, species] of ['Bulbasaur', 'Venusaur', 'Ivysaur'].entries()) {
assert.species(battle.p1.active[index], species);
}
- assert.strictEqual(battle.p1.active[2].lastMove.id, 'growth');
+ assert.equal(battle.p1.active[2].lastMove.id, 'growth');
});
it(`should support to ${mode} switch decisions on double switch requests`, function () {
@@ -995,9 +995,9 @@ describe('Choice extensions', function () {
if (mode === 'revoke') battle.undoChoice('p1');
battle.makeChoices('switch 3', 'switch 2');
- assert.strictEqual(battle.turn, 2);
- assert.strictEqual(battle.p1.active[0].template.species, 'Chikorita');
- assert.strictEqual(battle.p2.active[0].template.species, 'Charmander');
+ assert.equal(battle.turn, 2);
+ assert.equal(battle.p1.active[0].template.species, 'Chikorita');
+ assert.equal(battle.p2.active[0].template.species, 'Charmander');
});
it(`should support to ${mode} pass decisions on double switch requests`, function () {
@@ -1198,7 +1198,7 @@ describe('Choice internals', function () {
]});
const [p1, p2] = battle.sides;
- assert.strictEqual(battle.turn, 1);
+ assert.equal(battle.turn, 1);
p1.chooseMove(1);
p1.chooseMove(1);
@@ -1206,7 +1206,7 @@ describe('Choice internals', function () {
p2.chooseMove(1);
battle.commitDecisions();
- assert.strictEqual(battle.turn, 2);
+ assert.equal(battle.turn, 2);
assert.statStage(p2.active[0], 'atk', -1);
p1.chooseMove('recover');
@@ -1215,7 +1215,7 @@ describe('Choice internals', function () {
p2.chooseMove('calmmind');
battle.commitDecisions();
- assert.strictEqual(battle.turn, 3);
+ assert.equal(battle.turn, 3);
assert.fullHP(p1.active[1]);
p1.chooseMove('recover');
@@ -1224,7 +1224,7 @@ describe('Choice internals', function () {
p2.chooseMove('calmmind');
battle.commitDecisions();
- assert.strictEqual(battle.turn, 4);
+ assert.equal(battle.turn, 4);
assert.fullHP(p1.active[1]);
});
@@ -1242,7 +1242,7 @@ describe('Choice internals', function () {
]});
const [p1, p2] = battle.sides;
- assert.strictEqual(battle.turn, 1);
+ assert.equal(battle.turn, 1);
p1.chooseMove('selfdestruct');
p1.chooseMove('selfdestruct');
p2.chooseMove('recover');
@@ -1254,9 +1254,9 @@ describe('Choice internals', function () {
p1.chooseSwitch(4);
p1.chooseSwitch(3);
battle.commitDecisions();
- assert.strictEqual(battle.turn, 2);
- assert.strictEqual(p1.active[0].name, 'Ekans');
- assert.strictEqual(p1.active[1].name, 'Koffing');
+ assert.equal(battle.turn, 2);
+ assert.equal(p1.active[0].name, 'Ekans');
+ assert.equal(p1.active[1].name, 'Koffing');
});
it('should allow input of move and switch commands in a per Pokémon basis', function () {
@@ -1273,7 +1273,7 @@ describe('Choice internals', function () {
]});
const [p1, p2] = battle.sides;
- assert.strictEqual(battle.turn, 1);
+ assert.equal(battle.turn, 1);
p1.choose('move recover, switch 4');
assert.throws(() => p2.choose('switch 3'),
/\[Invalid choice\] Can't switch: You do not have a Pokémon in slot 3 to switch to/,
@@ -1282,9 +1282,9 @@ describe('Choice internals', function () {
p2.choose('move recover, move recover');
battle.commitDecisions();
- assert.strictEqual(battle.turn, 2);
- assert.strictEqual(p1.active[0].name, 'Mew');
- assert.strictEqual(p1.active[1].name, 'Ekans');
+ assert.equal(battle.turn, 2);
+ assert.equal(p1.active[0].name, 'Mew');
+ assert.equal(p1.active[1].name, 'Ekans');
p1.choose('switch 4, move leer');
assert.throws(() => p2.choose('switch 3'),
@@ -1294,9 +1294,9 @@ describe('Choice internals', function () {
p2.choose('move recover, move recover');
battle.commitDecisions();
- assert.strictEqual(battle.turn, 3);
- assert.strictEqual(p1.active[0].name, 'Bulbasaur');
- assert.strictEqual(p1.active[1].name, 'Ekans');
+ assert.equal(battle.turn, 3);
+ assert.equal(p1.active[0].name, 'Bulbasaur');
+ assert.equal(p1.active[1].name, 'Ekans');
});
it('should empty the actions list when undoing a move', function () {
diff --git a/test/sim/dex.js b/test/sim/dex.js
index 57acf80bb2..be71e6e0d8 100644
--- a/test/sim/dex.js
+++ b/test/sim/dex.js
@@ -7,23 +7,23 @@ describe('Mod loader', function () {
{
Chat.uncacheTree('./.sim-dist/dex');
let Dex = require('./../../../.sim-dist/dex').Dex;
- assert.strictEqual(Dex.mod('gen2').getTemplate('nidoking').learnset.bubblebeam.join(','), '1M');
- assert.strictEqual(Dex.mod('gen2').getMove('crunch').secondaries[0].boosts.def, undefined);
+ assert.equal(Dex.mod('gen2').getTemplate('nidoking').learnset.bubblebeam.join(','), '1M');
+ assert.equal(Dex.mod('gen2').getMove('crunch').secondaries[0].boosts.def, undefined);
}
{
Chat.uncacheTree('./.sim-dist/dex');
let Dex = require('./../../../.sim-dist/dex').Dex;
Dex.mod('gen2').getTemplate('nidoking');
Dex.mod('gen4').getMove('crunch');
- assert.strictEqual(Dex.mod('gen2').getTemplate('nidoking').learnset.bubblebeam.join(','), '1M');
- assert.strictEqual(Dex.mod('gen2').getMove('crunch').secondaries[0].boosts.def, undefined);
+ assert.equal(Dex.mod('gen2').getTemplate('nidoking').learnset.bubblebeam.join(','), '1M');
+ assert.equal(Dex.mod('gen2').getMove('crunch').secondaries[0].boosts.def, undefined);
}
});
});
describe('Dex#getEffect', function () {
it('returns the same object for the same id', function () {
- assert.strictEqual(Dex.getEffect('Stealth Rock'), Dex.getEffect('stealthrock'));
+ assert.equal(Dex.getEffect('Stealth Rock'), Dex.getEffect('stealthrock'));
assert.notStrictEqual(Dex.getEffect('move: Stealth Rock'), Dex.getEffect('stealthrock'));
});
diff --git a/test/sim/events.js b/test/sim/events.js
index 9da20a00b3..0efbe3d689 100644
--- a/test/sim/events.js
+++ b/test/sim/events.js
@@ -28,9 +28,9 @@ describe('Battle#on', function () {
return 5;
});
battle.makeChoices('move bulkup', 'move peck');
- assert.strictEqual(eventCount, 4);
- assert.strictEqual(eventCount2, 2);
- assert.strictEqual(battle.p1.active[0].maxhp - battle.p1.active[0].hp, 5);
+ assert.equal(eventCount, 4);
+ assert.equal(eventCount2, 2);
+ assert.equal(battle.p1.active[0].maxhp - battle.p1.active[0].hp, 5);
});
it('should support and resolve priorities correctly', function () {
@@ -41,7 +41,7 @@ describe('Battle#on', function () {
let eventCount = 0;
let modHandler = function (count) {
return function () {
- assert.strictEqual(eventCount, count);
+ assert.equal(eventCount, count);
eventCount++;
};
};
@@ -49,7 +49,7 @@ describe('Battle#on', function () {
battle.onEvent('ModifyDamage', battle.format, -i, modHandler(i));
}
battle.makeChoices('move bulkup', 'move peck');
- assert.strictEqual(eventCount, 9);
+ assert.equal(eventCount, 9);
});
it('should throw if a callback is not given for the event handler', function () {
diff --git a/test/sim/items/ejectpack.js b/test/sim/items/ejectpack.js
index 78d6d88725..676a368066 100644
--- a/test/sim/items/ejectpack.js
+++ b/test/sim/items/ejectpack.js
@@ -20,6 +20,6 @@ describe('Eject Pack', function () {
{species: 'Mew', ability: 'noability', moves: ['protect']},
]});
battle.makeChoices();
- assert.strictEqual(battle.requestState, 'switch');
+ assert.equal(battle.requestState, 'switch');
});
});
diff --git a/test/sim/items/focussash.js b/test/sim/items/focussash.js
index 7d56da6b5c..83b090e1a2 100644
--- a/test/sim/items/focussash.js
+++ b/test/sim/items/focussash.js
@@ -18,7 +18,7 @@ describe('Focus Sash', function () {
battle.makeChoices('move sleeptalk', 'move incinerate');
assert.false.holdsItem(holder);
assert.false.fainted(holder);
- assert.strictEqual(holder.hp, 1);
+ assert.equal(holder.hp, 1);
});
it('should be consumed and allow its user to survive a confusion damage hit from full HP', function () {
@@ -29,7 +29,7 @@ describe('Focus Sash', function () {
battle.makeChoices('move absorb', 'move confuseray');
assert.false.holdsItem(holder);
assert.false.fainted(holder);
- assert.strictEqual(holder.hp, 1);
+ assert.equal(holder.hp, 1);
});
it('should not trigger on recoil damage', function () {
diff --git a/test/sim/items/ironball.js b/test/sim/items/ironball.js
index e7a18b8921..8f110564c3 100644
--- a/test/sim/items/ironball.js
+++ b/test/sim/items/ironball.js
@@ -75,6 +75,6 @@ describe('Iron Ball', function () {
battle.setPlayer('p1', {team: [{species: "Smeargle", ability: 'owntempo', moves: ['spore']}]});
battle.setPlayer('p2', {team: [{species: "Thundurus", ability: 'prankster', item: 'ironball', moves: ['electricterrain']}]});
battle.makeChoices('move spore', 'move electricterrain');
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
});
});
diff --git a/test/sim/items/lansatberry.js b/test/sim/items/lansatberry.js
index 619324845b..fbde659d1c 100644
--- a/test/sim/items/lansatberry.js
+++ b/test/sim/items/lansatberry.js
@@ -30,14 +30,14 @@ describe('Lansat Berry', function () {
let i = 0;
let expectedRatio = [1, 1, 1, 1, 1, 3];
battle.onEvent('ModifyCritRatio', battle.format, -99, function (critRatio, pokemon) {
- assert.strictEqual(critRatio, expectedRatio[i++]);
+ assert.equal(critRatio, expectedRatio[i++]);
});
battle.makeChoices('move triplekick', 'move acidarmor');
battle.makeChoices('move triplekick', 'move acidarmor');
assert.false.holdsItem(holder);
- assert.strictEqual(holder.hp, 3);
- assert.strictEqual(i, 6);
+ assert.equal(holder.hp, 3);
+ assert.equal(i, 6);
});
});
diff --git a/test/sim/items/leftovers.js b/test/sim/items/leftovers.js
index 5dfe0ccd90..b2d6cc178c 100644
--- a/test/sim/items/leftovers.js
+++ b/test/sim/items/leftovers.js
@@ -21,10 +21,10 @@ describe('Leftovers [Gen 2]', function () {
]});
const holder = battle.p1.active[0];
battle.makeChoices('move healbell', 'move seismictoss');
- assert.strictEqual(holder.hp, 590);
+ assert.equal(holder.hp, 590);
battle.makeChoices('switch 2', 'move seismictoss');
battle.makeChoices('switch 2', '');
- assert.strictEqual(holder.hp, 630);
+ assert.equal(holder.hp, 630);
});
});
diff --git a/test/sim/items/leppaberry.js b/test/sim/items/leppaberry.js
index e59c2a7f82..ce268e7919 100644
--- a/test/sim/items/leppaberry.js
+++ b/test/sim/items/leppaberry.js
@@ -21,7 +21,7 @@ describe('Leppa Berry', function () {
battle.makeChoices('move sleeptalk', 'move sleeptalk');
battle.makeChoices('move splash', 'move fling');
- assert.strictEqual(pokemon.getMoveData('sleeptalk').pp, 16);
+ assert.equal(pokemon.getMoveData('sleeptalk').pp, 16);
assert.false.strictEqual(pokemon.getMoveData('splash').pp, 64);
});
});
diff --git a/test/sim/items/protectivepads.js b/test/sim/items/protectivepads.js
index 32bc5d3027..c67676eb7f 100644
--- a/test/sim/items/protectivepads.js
+++ b/test/sim/items/protectivepads.js
@@ -16,9 +16,9 @@ describe('Protective Pads', function () {
battle.setPlayer('p2', {team: [{species: "Hariyama", ability: 'thickfat', item: 'protectivepads', moves: ['bulletpunch']}]});
const attacker = battle.p2.active[0];
battle.makeChoices();
- assert.strictEqual(attacker.ability, 'thickfat');
+ assert.equal(attacker.ability, 'thickfat');
const mummyActivationMessages = battle.log.filter(logStr => logStr.startsWith('|-activate|') && logStr.includes('Mummy'));
- assert.strictEqual(mummyActivationMessages.length, 1, "Mummy should activate only once");
+ assert.equal(mummyActivationMessages.length, 1, "Mummy should activate only once");
assert.ok(mummyActivationMessages[0].includes('Cofagrigus'), "Source of Mummy activation should be included");
assert.false(mummyActivationMessages[0].includes('Thick Fat'), "Attacker's ability should not be revealed");
});
@@ -45,7 +45,7 @@ describe('Protective Pads', function () {
battle.setPlayer('p2', {team: [{species: "Liepard", ability: 'prankster', item: 'protectivepads', moves: ['scratch']}]});
battle.makeChoices();
assert.false(battle.p2.active[0].item, "Attacker should lose their item");
- assert.strictEqual(battle.p1.active[0].item, 'protectivepads', "Target should receive stolen item");
+ assert.equal(battle.p1.active[0].item, 'protectivepads', "Target should receive stolen item");
});
it('should prevent item effects triggered by contact from acting', function () {
diff --git a/test/sim/items/rockyhelmet.js b/test/sim/items/rockyhelmet.js
index c8b3abb480..613530dd63 100644
--- a/test/sim/items/rockyhelmet.js
+++ b/test/sim/items/rockyhelmet.js
@@ -16,6 +16,6 @@ describe('Rocky Helmet', function () {
battle.setPlayer('p2', {team: [{species: "Drampa", item: 'rockyhelmet', moves: ['sleeptalk']}]});
battle.makeChoices('move outrage', 'move sleeptalk');
const attacker = battle.p1.active[0];
- assert.strictEqual(attacker.hp, attacker.maxhp - Math.floor(attacker.maxhp / 6));
+ assert.equal(attacker.hp, attacker.maxhp - Math.floor(attacker.maxhp / 6));
});
});
diff --git a/test/sim/items/seeds.js b/test/sim/items/seeds.js
index 65b3328a54..4fb7c3d6e2 100644
--- a/test/sim/items/seeds.js
+++ b/test/sim/items/seeds.js
@@ -29,6 +29,6 @@ describe('Seeds', function () {
]);
battle.makeChoices('move protect', 'move magicroom');
battle.makeChoices('switch 2', 'move magicroom');
- assert.strictEqual(battle.p1.active[0].item, 'electricseed');
+ assert.equal(battle.p1.active[0].item, 'electricseed');
});
});
diff --git a/test/sim/items/sitrusberry.js b/test/sim/items/sitrusberry.js
index 0be8c1a712..4921cc068b 100644
--- a/test/sim/items/sitrusberry.js
+++ b/test/sim/items/sitrusberry.js
@@ -17,7 +17,7 @@ describe('Sitrus Berry', function () {
const holder = battle.p1.active[0];
battle.makeChoices('move sleeptalk', 'move aurasphere');
assert.false.holdsItem(holder);
- assert.strictEqual(holder.hp, Math.floor(holder.maxhp / 4) + 1);
+ assert.equal(holder.hp, Math.floor(holder.maxhp / 4) + 1);
});
it('should be eaten immediately if (re)gained on low hp', function () {
@@ -29,7 +29,7 @@ describe('Sitrus Berry', function () {
const hpgain = Math.floor(holder.maxhp / 4);
battle.makeChoices('move recycle', 'move earthquake');
assert.false.holdsItem(holder);
- assert.strictEqual(holder.hp, hpgain + hpgain + 1);
+ assert.equal(holder.hp, hpgain + hpgain + 1);
});
it('should not heal if Knocked Off', function () {
@@ -38,7 +38,7 @@ describe('Sitrus Berry', function () {
[{species: 'Krookodile', ability: 'intimidate', moves: ['knockoff']}],
]);
battle.makeChoices('move sleeptalk', 'move knockoff');
- assert.strictEqual(battle.p1.active[0].hp, 1);
+ assert.equal(battle.p1.active[0].hp, 1);
});
it.skip('should not heal 25% hp if a confusion self-hit triggers the healing', function () {
diff --git a/test/sim/misc/arceus.js b/test/sim/misc/arceus.js
index f3cd71b345..1d55c5e537 100644
--- a/test/sim/misc/arceus.js
+++ b/test/sim/misc/arceus.js
@@ -1,6 +1,6 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
const common = require('./../../common');
const unimportantPokemon = {species: 'magikarp', moves: ['splash']};
@@ -11,7 +11,7 @@ describe(`[Hackmons] Arceus`, function () {
[{species: 'arceus', ability: 'multitype', item: 'flameplate', moves: ['rest']}],
[unimportantPokemon],
]);
- assert.deepStrictEqual(battle.p1.active[0].getTypes(), ["Fire"]);
+ assert.deepEqual(battle.p1.active[0].getTypes(), ["Fire"]);
});
it(`in Steel forme should should be Water-typed to match the held Splash Plate`, function () {
@@ -19,7 +19,7 @@ describe(`[Hackmons] Arceus`, function () {
[{species: 'arceussteel', ability: 'multitype', item: 'splashplate', moves: ['rest']}],
[unimportantPokemon],
]);
- assert.deepStrictEqual(battle.p1.active[0].getTypes(), ["Water"]);
+ assert.deepEqual(battle.p1.active[0].getTypes(), ["Water"]);
});
it(`in a typed forme should be Normal-typed if no plate is held`, function () {
@@ -27,7 +27,7 @@ describe(`[Hackmons] Arceus`, function () {
[{species: 'Arceusfire', ability: 'multitype', item: 'leftovers', moves: ['rest']}],
[unimportantPokemon],
]);
- assert.deepStrictEqual(battle.p1.active[0].getTypes(), ["Normal"]);
+ assert.deepEqual(battle.p1.active[0].getTypes(), ["Normal"]);
});
it(`in a typed forme should be Normal-typed despite holding a plate if Arceus does not have the Multitype ability`, function () {
@@ -35,6 +35,6 @@ describe(`[Hackmons] Arceus`, function () {
[{species: 'arceusfire', ability: 'truant', item: 'flameplate', moves: ['rest']}],
[unimportantPokemon],
]);
- assert.deepStrictEqual(battle.p1.active[0].getTypes(), ["Normal"]);
+ assert.deepEqual(battle.p1.active[0].getTypes(), ["Normal"]);
});
});
diff --git a/test/sim/misc/faint-order.js b/test/sim/misc/faint-order.js
index 8db8382007..e706234558 100644
--- a/test/sim/misc/faint-order.js
+++ b/test/sim/misc/faint-order.js
@@ -23,7 +23,7 @@ describe('Fainting', function () {
]);
battle.makeChoices('move Explosion', 'move Substitute');
battle.makeChoices('switch Pikachu', '');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
it('should end the turn in Gen 3', function () {
@@ -38,7 +38,7 @@ describe('Fainting', function () {
]);
battle.makeChoices('move Explosion', 'move Substitute');
battle.makeChoices('switch Pikachu', '');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
it('should not end the turn in Gen 4', function () {
diff --git a/test/sim/misc/fusion-combo.js b/test/sim/misc/fusion-combo.js
index e75bf8595f..71f5a2adab 100644
--- a/test/sim/misc/fusion-combo.js
+++ b/test/sim/misc/fusion-combo.js
@@ -27,8 +27,8 @@ describe('Fusion Bolt + Fusion Flare', function () {
});
battle.makeChoices('move fusionbolt 1, move fusionflare 1', 'default');
- assert.strictEqual(bpModifiers.get('fusionbolt'), 2);
- assert.strictEqual(bpModifiers.get('fusionflare'), 2);
+ assert.equal(bpModifiers.get('fusionbolt'), 2);
+ assert.equal(bpModifiers.get('fusionflare'), 2);
});
it('should boost the second move if the first was used by the same pokemon', function () {
@@ -45,8 +45,8 @@ describe('Fusion Bolt + Fusion Flare', function () {
});
battle.makeChoices('move fusionflare 2, move instruct -1', 'default');
- assert.strictEqual(bpModifiers.get('fusionbolt'), 1);
- assert.strictEqual(bpModifiers.get('fusionflare'), 2);
+ assert.equal(bpModifiers.get('fusionbolt'), 1);
+ assert.equal(bpModifiers.get('fusionflare'), 2);
});
it('should not boost the second move if another move was used between them', function () {
@@ -63,6 +63,6 @@ describe('Fusion Bolt + Fusion Flare', function () {
});
battle.makeChoices('move fusionbolt 1, move fusionflare 1', 'default');
- assert.strictEqual(bpModifiers.get('fusionflare'), 1);
+ assert.equal(bpModifiers.get('fusionflare'), 1);
});
});
diff --git a/test/sim/misc/inversebattle.js b/test/sim/misc/inversebattle.js
index 2cb1afbc0b..4b710b8b2e 100644
--- a/test/sim/misc/inversebattle.js
+++ b/test/sim/misc/inversebattle.js
@@ -50,7 +50,7 @@ describe('Inverse Battle', function () {
pokemon = battle.p2.active[0];
const expectedPercent = Math.pow(0.5, i - 1);
const expectedDamage = Math.floor(pokemon.maxhp * expectedPercent);
- assert.strictEqual(pokemon.maxhp - pokemon.hp, expectedDamage, `${pokemon.name} should take ${expectedPercent * 100}%`);
+ assert.equal(pokemon.maxhp - pokemon.hp, expectedDamage, `${pokemon.name} should take ${expectedPercent * 100}%`);
}
});
@@ -60,7 +60,7 @@ describe('Inverse Battle', function () {
battle.makeChoices('move earthquake', 'move shadowsneak');
battle.makeChoices('move earthquake', 'move shadowsneak');
assert.ok(battle.log[battle.lastMoveLine + 1].startsWith('|-immune|'));
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
it('should not affect the type effectiveness of Freeze Dry on Water-type Pokemon', function () {
@@ -76,6 +76,6 @@ describe('Inverse Battle', function () {
battle.setPlayer('p2', {team: [{species: "Talonflame", ability: 'galewings', moves: ['mistyterrain']}]});
battle.makeChoices('move spore', 'move mistyterrain');
battle.makeChoices('move spore', 'move mistyterrain');
- assert.strictEqual(battle.p2.active[0].status, 'slp');
+ assert.equal(battle.p2.active[0].status, 'slp');
});
});
diff --git a/test/sim/misc/prng.js b/test/sim/misc/prng.js
index c4e8d31be6..cc7d2c9ec2 100644
--- a/test/sim/misc/prng.js
+++ b/test/sim/misc/prng.js
@@ -10,7 +10,7 @@ describe(`PRNG`, function () {
it(`should always return false`, function () {
const prng = new PRNG(testSeed);
for (let i = 0; i < 100; ++i) {
- assert.strictEqual(prng.randomChance(0, 1), false);
+ assert.equal(prng.randomChance(0, 1), false);
}
});
});
@@ -18,7 +18,7 @@ describe(`PRNG`, function () {
it(`should always return true`, function () {
const prng = new PRNG(testSeed);
for (let i = 0; i < 100; ++i) {
- assert.strictEqual(prng.randomChance(1, 1), true);
+ assert.equal(prng.randomChance(1, 1), true);
}
});
});
@@ -26,7 +26,7 @@ describe(`PRNG`, function () {
it(`should always return true`, function () {
const prng = new PRNG(testSeed);
for (let i = 0; i < 100; ++i) {
- assert.strictEqual(prng.randomChance(256, 256), true);
+ assert.equal(prng.randomChance(256, 256), true);
}
});
});
@@ -46,7 +46,7 @@ describe(`PRNG`, function () {
const coinPRNG = new PRNG(testSeed);
const numberPRNG = new PRNG(testSeed);
for (let i = 0; i < 10; ++i) {
- assert.strictEqual(numberPRNG.next(2) === 0, coinPRNG.randomChance(1, 2));
+ assert.equal(numberPRNG.next(2) === 0, coinPRNG.randomChance(1, 2));
}
});
});
@@ -66,7 +66,7 @@ describe(`PRNG`, function () {
const coinPRNG = new PRNG(testSeed);
const numberPRNG = new PRNG(testSeed);
for (let i = 0; i < 10; ++i) {
- assert.strictEqual(numberPRNG.next(256) < 217, coinPRNG.randomChance(217, 256));
+ assert.equal(numberPRNG.next(256) < 217, coinPRNG.randomChance(217, 256));
}
});
});
@@ -101,7 +101,7 @@ describe(`PRNG`, function () {
const prng = new PRNG(testSeed);
for (let i = 0; i < 10; ++i) {
const sample = prng.sample([item]);
- assert.strictEqual(sample, item);
+ assert.equal(sample, item);
}
});
it(`should return items with equal probability for a five-item array`, function () {
@@ -135,7 +135,7 @@ describe(`PRNG`, function () {
const samplePRNG = new PRNG(testSeed);
const randomIntegerPRNG = new PRNG(testSeed);
for (let i = 0; i < 10; ++i) {
- assert.strictEqual(items[randomIntegerPRNG.next(items.length)], samplePRNG.sample(items));
+ assert.equal(items[randomIntegerPRNG.next(items.length)], samplePRNG.sample(items));
}
});
});
diff --git a/test/sim/misc/silvally.js b/test/sim/misc/silvally.js
index 7c643f9816..df86f1e865 100644
--- a/test/sim/misc/silvally.js
+++ b/test/sim/misc/silvally.js
@@ -1,6 +1,6 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
const common = require('./../../common');
const unimportantPokemon = {species: 'magikarp', moves: ['splash']};
@@ -11,7 +11,7 @@ describe(`[Hackmons] Silvally`, function () {
[{species: 'silvally', ability: 'rkssystem', item: 'firememory', moves: ['rest']}],
[unimportantPokemon],
]);
- assert.deepStrictEqual(battle.p1.active[0].getTypes(), ["Fire"]);
+ assert.deepEqual(battle.p1.active[0].getTypes(), ["Fire"]);
});
it(`in Steel forme should should be Water-typed to match the held Water Memory`, function () {
@@ -19,7 +19,7 @@ describe(`[Hackmons] Silvally`, function () {
[{species: 'silvallysteel', ability: 'rkssystem', item: 'watermemory', moves: ['rest']}],
[unimportantPokemon],
]);
- assert.deepStrictEqual(battle.p1.active[0].getTypes(), ["Water"]);
+ assert.deepEqual(battle.p1.active[0].getTypes(), ["Water"]);
});
it(`in a typed forme should be Normal-typed if no memory is held`, function () {
@@ -27,7 +27,7 @@ describe(`[Hackmons] Silvally`, function () {
[{species: 'silvallyfire', ability: 'rkssystem', item: 'leftovers', moves: ['rest']}],
[unimportantPokemon],
]);
- assert.deepStrictEqual(battle.p1.active[0].getTypes(), ["Normal"]);
+ assert.deepEqual(battle.p1.active[0].getTypes(), ["Normal"]);
});
it(`[Gen 7] in a typed forme should be Normal-typed despite holding a memory if Silvally does not have the RKS System ability`, function () {
@@ -35,6 +35,6 @@ describe(`[Hackmons] Silvally`, function () {
[{species: 'silvallyfire', ability: 'truant', item: 'firememory', moves: ['rest']}],
[unimportantPokemon],
]);
- assert.deepStrictEqual(battle.p1.active[0].getTypes(), ["Normal"]);
+ assert.deepEqual(battle.p1.active[0].getTypes(), ["Normal"]);
});
});
diff --git a/test/sim/misc/sleepclausemod.js b/test/sim/misc/sleepclausemod.js
index 49ab21e2f2..6ab74c4baa 100644
--- a/test/sim/misc/sleepclausemod.js
+++ b/test/sim/misc/sleepclausemod.js
@@ -13,9 +13,9 @@ describe('Sleep Clause Mod', () => {
battle.setPlayer('p1', {team: [{species: "Paras", moves: ['spore']}]});
battle.setPlayer('p2', {team: [{species: "Magikarp", moves: ['splash']}, {species: "Feebas", moves: ['splash']}]});
battle.makeChoices('move spore', 'switch 2');
- assert.strictEqual(battle.p2.active[0].status, 'slp');
+ assert.equal(battle.p2.active[0].status, 'slp');
battle.makeChoices('move spore', 'switch 2');
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
});
it('should not prevent Rest', () => {
@@ -23,10 +23,10 @@ describe('Sleep Clause Mod', () => {
battle.setPlayer('p1', {team: [{species: "Paras", moves: ['spore', 'tackle']}]});
battle.setPlayer('p2', {team: [{species: "Feebas", moves: ['rest']}, {species: "Magikarp", moves: ['splash']}]});
battle.makeChoices('move spore', 'switch 2');
- assert.strictEqual(battle.p2.active[0].status, 'slp');
+ assert.equal(battle.p2.active[0].status, 'slp');
battle.makeChoices('move tackle', 'switch 2');
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
battle.makeChoices('move tackle', 'move rest');
- assert.strictEqual(battle.p2.active[0].status, 'slp');
+ assert.equal(battle.p2.active[0].status, 'slp');
});
});
diff --git a/test/sim/misc/state.js b/test/sim/misc/state.js
index 481e2a4ee5..09a0480930 100644
--- a/test/sim/misc/state.js
+++ b/test/sim/misc/state.js
@@ -30,7 +30,7 @@ describe('State', function () {
control.makeChoices();
test.makeChoices();
- assert.deepStrictEqual(test.toJSON(), control.toJSON());
+ assert.deepEqual(test.toJSON(), control.toJSON());
// Roundtrip the test battle to confirm it still works.
const send = test.send;
diff --git a/test/sim/misc/statuses.js b/test/sim/misc/statuses.js
index d82b22fea8..ce07d99ea7 100644
--- a/test/sim/misc/statuses.js
+++ b/test/sim/misc/statuses.js
@@ -50,7 +50,7 @@ describe('Paralysis', function () {
battle.setPlayer('p2', {team: [{species: 'Jolteon', ability: 'voltabsorb', moves: ['thunderwave']}]});
let speed = battle.p1.active[0].getStat('spe');
battle.makeChoices('move aquaring', 'move thunderwave');
- assert.strictEqual(battle.p1.active[0].getStat('spe'), battle.modify(speed, 0.5));
+ assert.equal(battle.p1.active[0].getStat('spe'), battle.modify(speed, 0.5));
});
it('should reduce speed to 25% of its original value in Gen 6', function () {
@@ -59,7 +59,7 @@ describe('Paralysis', function () {
battle.setPlayer('p2', {team: [{species: 'Jolteon', ability: 'voltabsorb', moves: ['thunderwave']}]});
let speed = battle.p1.active[0].getStat('spe');
battle.makeChoices('move aquaring', 'move thunderwave');
- assert.strictEqual(battle.p1.active[0].getStat('spe'), battle.modify(speed, 0.25));
+ assert.equal(battle.p1.active[0].getStat('spe'), battle.modify(speed, 0.25));
});
it('should reduce speed to 25% of its original value in Gen 2', function () {
@@ -68,7 +68,7 @@ describe('Paralysis', function () {
battle.setPlayer('p2', {team: [{species: 'Jolteon', ability: 'voltabsorb', moves: ['thunderwave']}]});
let speed = battle.p1.active[0].getStat('spe');
battle.makeChoices('move aquaring', 'move thunderwave');
- assert.strictEqual(battle.p1.active[0].getStat('spe'), battle.modify(speed, 0.25));
+ assert.equal(battle.p1.active[0].getStat('spe'), battle.modify(speed, 0.25));
});
it('should reduce speed to 25% of its original value in Stadium', function () {
@@ -78,7 +78,7 @@ describe('Paralysis', function () {
]);
let speed = battle.p1.active[0].getStat('spe');
battle.makeChoices('move growl', 'move thunderwave');
- assert.strictEqual(battle.p1.active[0].getStat('spe'), battle.modify(speed, 0.25));
+ assert.equal(battle.p1.active[0].getStat('spe'), battle.modify(speed, 0.25));
});
it('should reapply its speed drop when an opponent uses a stat-altering move in Gen 1', function () {
@@ -89,7 +89,7 @@ describe('Paralysis', function () {
battle.makeChoices('move rest', 'move thunderwave');
let speed = battle.p1.active[0].getStat('spe');
battle.makeChoices('move rest', 'move amnesia');
- assert.strictEqual(battle.p1.active[0].getStat('spe'), battle.modify(speed, 0.25));
+ assert.equal(battle.p1.active[0].getStat('spe'), battle.modify(speed, 0.25));
});
it('should not reapply its speed drop when an opponent uses a failed stat-altering move in Gen 1', function () {
@@ -103,7 +103,7 @@ describe('Paralysis', function () {
battle.makeChoices('move rest', 'move thunderwave');
let speed = battle.p1.active[0].getStat('spe');
battle.makeChoices('move rest', 'move amnesia');
- assert.strictEqual(battle.p1.active[0].getStat('spe'), speed);
+ assert.equal(battle.p1.active[0].getStat('spe'), speed);
});
});
@@ -120,7 +120,7 @@ describe('Toxic Poison', function () {
const target = battle.p1.active[0];
for (let i = 1; i <= 8; i++) {
battle.makeChoices('move softboiled', 'move toxic');
- assert.strictEqual(target.maxhp - target.hp, Math.floor(target.maxhp / 16) * i);
+ assert.equal(target.maxhp - target.hp, Math.floor(target.maxhp / 16) * i);
}
});
@@ -135,7 +135,7 @@ describe('Toxic Poison', function () {
let pokemon = battle.p1.active[0];
pokemon.hp = pokemon.maxhp;
battle.makeChoices('switch 2', 'move whirlwind');
- assert.strictEqual(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 16));
+ assert.equal(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 16));
});
});
@@ -159,8 +159,8 @@ describe('Freeze', function () {
}
});
battle.makeChoices('move icebeam', 'move sleeptalk');
- assert.strictEqual(battle.p2.active[0].status, 'frz');
- assert.strictEqual(battle.p2.active[0].template.species, 'Shaymin');
+ assert.equal(battle.p2.active[0].status, 'frz');
+ assert.equal(battle.p2.active[0].template.species, 'Shaymin');
});
it('should not cause an afflicted Pokemon transformed into Shaymin-Sky to change to Shaymin', function () {
@@ -177,8 +177,8 @@ describe('Freeze', function () {
}
});
battle.makeChoices('move sleeptalk', 'move icebeam');
- assert.strictEqual(battle.p1.active[0].status, 'frz');
- assert.strictEqual(battle.p1.active[0].template.species, 'Shaymin-Sky');
+ assert.equal(battle.p1.active[0].status, 'frz');
+ assert.equal(battle.p1.active[0].template.species, 'Shaymin-Sky');
});
});
@@ -209,10 +209,10 @@ describe('Toxic Poison [Gen 1]', function () {
]);
battle.makeChoices('move toxic', 'move splash');
let pokemon = battle.p2.active[0];
- assert.strictEqual(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 16));
+ assert.equal(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 16));
battle.makeChoices('move leechseed', 'move splash');
// (1/16) + (2/16) + (3/16) = (6/16)
- assert.strictEqual(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 16) * 6);
+ assert.equal(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 16) * 6);
});
});
@@ -229,10 +229,10 @@ describe('Toxic Poison [Gen 2]', function () {
]);
battle.makeChoices('move toxic', 'move splash');
let pokemon = battle.p2.active[0];
- assert.strictEqual(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 16));
+ assert.equal(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 16));
battle.makeChoices('move leechseed', 'move splash');
// (1/16) + (2/16) + (1/8) = (5/16)
- assert.strictEqual(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 16) * 5);
+ assert.equal(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 16) * 5);
});
it('should pass the damage counter to Pokemon with Baton Pass', function () {
@@ -254,16 +254,16 @@ describe('Toxic Poison [Gen 2]', function () {
battle.makeChoices('', 'switch 2');
let hp = pokemon.hp;
battle.makeChoices('move splash', 'move splash');
- assert.strictEqual(hp - pokemon.hp, Math.floor(pokemon.maxhp / 16) * 4);
+ assert.equal(hp - pokemon.hp, Math.floor(pokemon.maxhp / 16) * 4);
// Only hint about this once per battle, not every turn.
- assert.strictEqual(battle.log.filter(m => m.startsWith('|-hint')).length, 1);
+ assert.equal(battle.log.filter(m => m.startsWith('|-hint')).length, 1);
// Damage counter should be removed on regular switch out
battle.makeChoices('move splash', 'switch 2');
hp = pokemon.hp;
battle.makeChoices('move splash', 'switch 2');
- assert.strictEqual(hp - pokemon.hp, Math.floor(pokemon.maxhp / 8));
+ assert.equal(hp - pokemon.hp, Math.floor(pokemon.maxhp / 8));
});
it('should revert to regular poison on switch in, even for Poison types', function () {
@@ -280,7 +280,7 @@ describe('Toxic Poison [Gen 2]', function () {
// We could check 'psn' at this point, but the following line caused crashes
// before #5463 was fixed so its useful to execute for regression testing purposes.
battle.makeChoices('move splash', 'move splash');
- assert.strictEqual(battle.p2.active[0].status, 'psn');
+ assert.equal(battle.p2.active[0].status, 'psn');
});
it('should not have its damage counter affected by Heal Bell', function () {
@@ -295,13 +295,13 @@ describe('Toxic Poison [Gen 2]', function () {
battle.makeChoices('move sacredfire', 'move splash');
let hp = pokemon.hp;
battle.makeChoices('move splash', 'move splash');
- assert.strictEqual(hp - pokemon.hp, Math.floor(pokemon.maxhp / 16) * 3);
+ assert.equal(hp - pokemon.hp, Math.floor(pokemon.maxhp / 16) * 3);
hp = pokemon.hp;
battle.makeChoices('move splash', 'move healbell');
battle.resetRNG(); // Guarantee Toxic hits
battle.makeChoices('move toxic', 'move splash');
// Toxic counter should be reset by a successful Toxic
- assert.strictEqual(hp - pokemon.hp, Math.floor(pokemon.maxhp / 16));
+ assert.equal(hp - pokemon.hp, Math.floor(pokemon.maxhp / 16));
});
});
diff --git a/test/sim/misc/statusmoves.js b/test/sim/misc/statusmoves.js
index dff30864f1..579ea649e0 100644
--- a/test/sim/misc/statusmoves.js
+++ b/test/sim/misc/statusmoves.js
@@ -23,7 +23,7 @@ describe('Most status moves', function () {
battle.makeChoices('move gastroacid', 'move return');
assert.false.holdsItem(battle.p2.active[0]); // Klefki's Magician suppressed by Gastro Acid.
battle.makeChoices('move glare', 'switch 2'); // Dusknoir
- assert.strictEqual(battle.p2.active[0].status, 'par');
+ assert.equal(battle.p2.active[0].status, 'par');
battle.makeChoices('move confuseray', 'switch 3'); // Slaking
assert.ok(battle.p2.active[0].volatiles['confusion']);
battle.makeChoices('move sandattack', 'switch 4'); // Tornadus
@@ -45,27 +45,27 @@ describe('Most status moves', function () {
]});
battle.makeChoices('move thunderwave', 'move charge');
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
assert.ok(battle.log[battle.lastMoveLine + 1].startsWith('|-immune|'));
battle.makeChoices('move willowisp', 'switch 2'); // Emboar
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
assert.ok(battle.log[battle.lastMoveLine + 1].startsWith('|-immune|'));
battle.makeChoices('move poisongas', 'switch 3'); // Muk
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
assert.ok(battle.log[battle.lastMoveLine + 1].startsWith('|-immune|'));
battle.makeChoices('move toxic', 'move shadowsneak');
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
assert.ok(battle.log[battle.lastMoveLine + 1].startsWith('|-immune|'));
battle.makeChoices('move poisongas', 'switch 4'); // Aron
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
assert.ok(battle.log[battle.lastMoveLine + 1].startsWith('|-immune|'));
battle.makeChoices('move toxic', 'move magnetrise');
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
assert.ok(battle.log[battle.lastMoveLine + 1].startsWith('|-immune|'));
});
});
diff --git a/test/sim/misc/target-resolution.js b/test/sim/misc/target-resolution.js
index a3dbadb72b..900fee25cf 100644
--- a/test/sim/misc/target-resolution.js
+++ b/test/sim/misc/target-resolution.js
@@ -38,7 +38,7 @@ describe('Target Resolution', function () {
battle.makeChoices('move watergun -2, auto', 'auto');
const newHps = activePokemonList.map(pokemon => pokemon.hp);
- assert.deepStrictEqual(prevHps, newHps);
+ assert.deepEqual(prevHps, newHps);
assert(battle.log.includes('|move|p1a: Wailord|Water Gun|p1: Latias|[notarget]'));
assert(battle.log.includes('|-fail|p1a: Wailord'));
});
@@ -135,7 +135,7 @@ describe('Target Resolution', function () {
battle.makeChoices('move watergun -2, pass', 'move watergun -2, pass');
const newHps = attackers.map(pokemon => pokemon.hp);
- assert.deepStrictEqual(prevHps, newHps);
+ assert.deepEqual(prevHps, newHps);
assert(battle.log.includes('|move|p1a: Wailord|Water Gun|p1: Shedinja|[notarget]'));
assert(battle.log.includes('|-fail|p1a: Wailord'));
assert(battle.log.includes('|move|p2a: Wailord|Water Gun|p2: Shedinja|[notarget]'));
diff --git a/test/sim/misc/trapmoves.js b/test/sim/misc/trapmoves.js
index 33545a1466..0cc86ea29c 100644
--- a/test/sim/misc/trapmoves.js
+++ b/test/sim/misc/trapmoves.js
@@ -22,7 +22,7 @@ describe('Trapping Moves', function () {
]});
battle.makeChoices('move ' + toID(move), 'move swordsdance');
assert.trapped(() => battle.makeChoices('move ' + toID(move), 'switch 2'));
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'tangrowth');
+ assert.equal(battle.p2.active[0].template.speciesid, 'tangrowth');
});
it('should not prevent Pokemon from switching out using moves', function () {
@@ -34,7 +34,7 @@ describe('Trapping Moves', function () {
]});
battle.makeChoices('move ' + toID(move), 'move batonpass');
battle.makeChoices('', 'switch 2');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'starmie');
+ assert.equal(battle.p2.active[0].template.speciesid, 'starmie');
});
it('should not prevent Pokemon immune to trapping from switching out', function () {
@@ -46,7 +46,7 @@ describe('Trapping Moves', function () {
]});
battle.makeChoices('move ' + toID(move), 'move synthesis');
battle.makeChoices('move ' + toID(move), 'switch 2');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'starmie');
+ assert.equal(battle.p2.active[0].template.speciesid, 'starmie');
});
it('should stop trapping the Pokemon if the user is no longer active', function () {
@@ -61,7 +61,7 @@ describe('Trapping Moves', function () {
]});
battle.makeChoices('move ' + toID(move), 'move roar');
battle.makeChoices('move rest', 'switch 2');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'starmie');
+ assert.equal(battle.p2.active[0].template.speciesid, 'starmie');
});
it('should free all trapped Pokemon if the user is no longer active', function () {
@@ -83,8 +83,8 @@ describe('Trapping Moves', function () {
battle.makeChoices('move ' + toID(move) + ', move closecombat -1', 'move synthesis, move recover');
}
battle.makeChoices('move swordsdance', 'switch 3, switch 4');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'cradily');
- assert.strictEqual(battle.p2.active[1].template.speciesid, 'hippowdon');
+ assert.equal(battle.p2.active[0].template.speciesid, 'cradily');
+ assert.equal(battle.p2.active[1].template.speciesid, 'hippowdon');
});
if (trappers.indexOf(move) < 3) {
@@ -102,10 +102,10 @@ describe('Trapping Moves', function () {
battle.makeChoices('move ' + toID(move), 'move synthesis');
battle.makeChoices('move batonpass', 'move synthesis');
battle.makeChoices('switch 2', '');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'tangrowth');
+ assert.equal(battle.p2.active[0].template.speciesid, 'tangrowth');
battle.makeChoices('move rest', 'move roar');
battle.makeChoices('move batonpass', 'switch 2');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'starmie');
+ assert.equal(battle.p2.active[0].template.speciesid, 'starmie');
});
}
}
@@ -125,7 +125,7 @@ describe('Partial Trapping Moves', function () {
let pokemon = battle.p2.active[0];
pokemon.heal(pokemon.maxhp);
battle.makeChoices('move rest', 'move healbell');
- assert.strictEqual(pokemon.maxhp - pokemon.hp, battle.modify(pokemon.maxhp, 1 / 8));
+ assert.equal(pokemon.maxhp - pokemon.hp, battle.modify(pokemon.maxhp, 1 / 8));
});
it('should prevent Pokemon from switching out normally', function () {
@@ -137,7 +137,7 @@ describe('Partial Trapping Moves', function () {
]});
battle.makeChoices('move ' + toID(move), 'move healbell');
assert.trapped(() => battle.makeChoices('move ' + toID(move), 'switch 2'));
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'blissey');
+ assert.equal(battle.p2.active[0].template.speciesid, 'blissey');
});
it('should not prevent Pokemon from switching out using moves', function () {
@@ -149,7 +149,7 @@ describe('Partial Trapping Moves', function () {
]});
battle.makeChoices('move ' + toID(move), 'move batonpass');
battle.makeChoices('', 'switch 2');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'starmie');
+ assert.equal(battle.p2.active[0].template.speciesid, 'starmie');
});
it('should not prevent Pokemon immune to trapping from switching out', function () {
@@ -161,7 +161,7 @@ describe('Partial Trapping Moves', function () {
]});
battle.makeChoices('move ' + toID(move), 'move sleeptalk');
battle.makeChoices('move ' + toID(move), 'switch 2');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'starmie');
+ assert.equal(battle.p2.active[0].template.speciesid, 'starmie');
});
it('should stop trapping the Pokemon if the user is no longer active', function () {
@@ -176,7 +176,7 @@ describe('Partial Trapping Moves', function () {
]});
battle.makeChoices('move ' + toID(move), 'move roar');
battle.makeChoices('move rest', 'switch 2');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'starmie');
+ assert.equal(battle.p2.active[0].template.speciesid, 'starmie');
});
it('should stop trapping the Pokemon if the target uses Rapid Spin', function () {
@@ -191,7 +191,7 @@ describe('Partial Trapping Moves', function () {
]});
battle.makeChoices('move ' + toID(move), 'move rapidspin');
battle.makeChoices('move ' + toID(move), 'switch 2');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'starmie');
+ assert.equal(battle.p2.active[0].template.speciesid, 'starmie');
});
}
});
diff --git a/test/sim/misc/turn-order.js b/test/sim/misc/turn-order.js
index aad52f4d6d..bcc0f92bf5 100644
--- a/test/sim/misc/turn-order.js
+++ b/test/sim/misc/turn-order.js
@@ -55,7 +55,7 @@ describe('Mega Evolution', function () {
battle.setPlayer('p2', {team: [{species: 'Hoopa-Unbound', ability: 'magician', moves: ['darkpulse']}]});
const fastBase = battle.p2.active[0];
battle.makeChoices('move xscissor ultra', 'move darkpulse');
- assert.strictEqual(fastBase.hp, 0);
+ assert.equal(fastBase.hp, 0);
});
});
@@ -169,6 +169,6 @@ describe('Switching', function () {
battle.setPlayer('p2', {team: p2team});
battle.makeChoices('switch 2', 'switch 2');
- assert.strictEqual(battle.p2.pokemon[0].boosts.atk, 0);
+ assert.equal(battle.p2.pokemon[0].boosts.atk, 0);
});
});
diff --git a/test/sim/misc/weather.js b/test/sim/misc/weather.js
index 5a68308cc3..69dd4cb77b 100644
--- a/test/sim/misc/weather.js
+++ b/test/sim/misc/weather.js
@@ -20,7 +20,7 @@ describe('Weather damage calculation', function () {
assert.hurtsBy(defender, 152, () => battle.makeChoices('move incinerate', 'move splash'));
const move = Dex.getMove('incinerate');
const basePower = battle.runEvent('BasePower', attacker, defender, move, move.basePower, true);
- assert.strictEqual(basePower, move.basePower);
+ assert.equal(basePower, move.basePower);
});
it('should reduce the damage (not the basePower) in unfavorable weather', function () {
@@ -33,7 +33,7 @@ describe('Weather damage calculation', function () {
assert.hurtsBy(defender, 50, () => battle.makeChoices('move incinerate', 'move splash'));
const move = Dex.getMove('incinerate');
const basePower = battle.runEvent('BasePower', attacker, defender, move, move.basePower, true);
- assert.strictEqual(basePower, move.basePower);
+ assert.equal(basePower, move.basePower);
});
it('should make Hail/Sandstorm damage some pokemon but not others', function () {
@@ -44,7 +44,7 @@ describe('Weather damage calculation', function () {
battle.makeChoices('move protect', 'move protect');
const p1active = battle.p1.active[0];
const p2active = battle.p2.active[0];
- assert.strictEqual(p1active.hp, p1active.maxhp);
+ assert.equal(p1active.hp, p1active.maxhp);
assert.notEqual(p2active.hp, p2active.maxhp);
});
});
diff --git a/test/sim/misc/weight.js b/test/sim/misc/weight.js
index 2107612ed2..6bfbf9111b 100644
--- a/test/sim/misc/weight.js
+++ b/test/sim/misc/weight.js
@@ -22,7 +22,7 @@ describe('Heavy Metal', function () {
}
});
battle.makeChoices('move nastyplot', 'move grassknot');
- assert.strictEqual(basePower, 80);
+ assert.equal(basePower, 80);
});
it('should be negated by Mold Breaker', function () {
@@ -37,7 +37,7 @@ describe('Heavy Metal', function () {
}
});
battle.makeChoices('move nastyplot', 'move grassknot');
- assert.strictEqual(basePower, 60);
+ assert.equal(basePower, 60);
});
});
@@ -58,7 +58,7 @@ describe('Light Metal', function () {
}
});
battle.makeChoices('move curse', 'move grassknot');
- assert.strictEqual(basePower, 100);
+ assert.equal(basePower, 100);
});
it('should be negated by Mold Breaker', function () {
@@ -73,7 +73,7 @@ describe('Light Metal', function () {
}
});
battle.makeChoices('move splash', 'move grassknot');
- assert.strictEqual(basePower, 120);
+ assert.equal(basePower, 120);
});
});
@@ -94,7 +94,7 @@ describe('Float Stone', function () {
}
});
battle.makeChoices('move curse', 'move grassknot');
- assert.strictEqual(basePower, 100);
+ assert.equal(basePower, 100);
});
});
@@ -115,9 +115,9 @@ describe('Autotomize', function () {
}
});
battle.makeChoices('move autotomize', 'move grassknot');
- assert.strictEqual(basePower, 100);
+ assert.equal(basePower, 100);
battle.makeChoices('move autotomize', 'move grassknot');
- assert.strictEqual(basePower, 20);
+ assert.equal(basePower, 20);
});
it('should factor into weight before Heavy Metal does', function () {
@@ -132,7 +132,7 @@ describe('Autotomize', function () {
}
});
battle.makeChoices('move autotomize', 'move grassknot');
- assert.strictEqual(basePower, 60);
+ assert.equal(basePower, 60);
});
it('should reset after a forme change', function () {
@@ -148,6 +148,6 @@ describe('Autotomize', function () {
});
battle.makeChoices('move autotomize', 'move grassknot');
battle.makeChoices('move shadowsneak', 'move grassknot');
- assert.strictEqual(basePower, 80);
+ assert.equal(basePower, 80);
});
});
diff --git a/test/sim/moves/belch.js b/test/sim/moves/belch.js
index a6de9bfdd7..b67ed5d9ec 100644
--- a/test/sim/moves/belch.js
+++ b/test/sim/moves/belch.js
@@ -15,9 +15,9 @@ describe('Belch', function () {
battle.setPlayer('p1', {team: [{species: 'Swalot', ability: 'gluttony', item: 'lumberry', moves: ['belch', 'stockpile']}]});
battle.setPlayer('p2', {team: [{species: 'Registeel', ability: 'clearbody', item: 'laggingtail', moves: ['thunderwave']}]});
battle.makeChoices('move Stockpile', 'move Thunderwave');
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'stockpile');
+ assert.equal(battle.p1.active[0].lastMove.id, 'stockpile');
battle.makeChoices('move Belch', 'move Thunderwave');
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'belch');
+ assert.equal(battle.p1.active[0].lastMove.id, 'belch');
});
it('should count berries as consumed with Bug Bite or Pluck', function () {
@@ -26,8 +26,8 @@ describe('Belch', function () {
battle.setPlayer('p2', {team: [{species: 'Swalot', ability: 'gluttony', item: 'salacberry', moves: ['belch', 'pluck']}]});
battle.makeChoices('move Bugbite', 'move Pluck');
battle.makeChoices('move Belch', 'move Belch');
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'belch');
- assert.strictEqual(battle.p2.active[0].lastMove.id, 'belch');
+ assert.equal(battle.p1.active[0].lastMove.id, 'belch');
+ assert.equal(battle.p2.active[0].lastMove.id, 'belch');
});
it('should count berries as consumed when they are Flung', function () {
@@ -36,7 +36,7 @@ describe('Belch', function () {
battle.setPlayer('p2', {team: [{species: 'Machamp', ability: 'noguard', item: 'salacberry', moves: ['fling']}]});
battle.makeChoices('move Stockpile', 'move Fling');
battle.makeChoices('move Belch', 'move Fling');
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'belch');
+ assert.equal(battle.p1.active[0].lastMove.id, 'belch');
});
it('should still count berries as consumed after switch out', function () {
@@ -52,6 +52,6 @@ describe('Belch', function () {
battle.makeChoices('switch 2', ''); // For U-Turn
battle.makeChoices('switch 2', 'move Will-o-Wisp');
battle.makeChoices('move Belch', 'move Will-o-Wisp');
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'belch');
+ assert.equal(battle.p1.active[0].lastMove.id, 'belch');
});
});
diff --git a/test/sim/moves/bellydrum.js b/test/sim/moves/bellydrum.js
index 05b0e127eb..20c05a4f01 100644
--- a/test/sim/moves/bellydrum.js
+++ b/test/sim/moves/bellydrum.js
@@ -14,7 +14,7 @@ describe('Belly Drum', function () {
battle.setPlayer('p2', {team: [{species: "Terrakion", ability: 'justified', moves: ['bulkup']}]});
const user = battle.p1.active[0];
battle.makeChoices('move bellydrum', 'move bulkup');
- assert.strictEqual(user.hp, Math.ceil(user.maxhp / 2));
+ assert.equal(user.hp, Math.ceil(user.maxhp / 2));
assert.statStage(user, 'atk', 6);
});
@@ -24,7 +24,7 @@ describe('Belly Drum', function () {
battle.setPlayer('p2', {team: [{species: "Terrakion", ability: 'justified', moves: ['closecombat']}]});
const user = battle.p1.active[0];
battle.makeChoices('move bellydrum', 'move closecombat');
- assert.strictEqual(user.hp, 1);
+ assert.equal(user.hp, 1);
assert.statStage(user, 'atk', 0);
});
});
@@ -38,7 +38,7 @@ describe('Z-Belly Drum', function () {
battle.setPlayer('p2', {team: [{species: "Rattata", ability: 'guts', moves: ['quickattack']}]});
const user = battle.p1.active[0];
battle.makeChoices('move bellydrum zmove', 'move quickattack');
- assert.strictEqual(user.hp, Math.ceil(user.maxhp / 2));
+ assert.equal(user.hp, Math.ceil(user.maxhp / 2));
assert.statStage(user, 'atk', 6);
});
@@ -48,7 +48,7 @@ describe('Z-Belly Drum', function () {
battle.setPlayer('p2', {team: [{species: "Terrakion", ability: 'justified', moves: ['closecombat']}]});
const user = battle.p1.active[0];
battle.makeChoices('move bellydrum zmove', 'move closecombat');
- assert.strictEqual(user.hp, Math.ceil(user.maxhp / 2));
+ assert.equal(user.hp, Math.ceil(user.maxhp / 2));
assert.statStage(user, 'atk', 6);
});
});
diff --git a/test/sim/moves/boomburst.js b/test/sim/moves/boomburst.js
index abcb3a885d..a07bccedae 100644
--- a/test/sim/moves/boomburst.js
+++ b/test/sim/moves/boomburst.js
@@ -16,6 +16,6 @@ describe('Boomburst', function () {
battle.setPlayer('p2', {team: [{species: "Caterpie", level: 2, ability: 'naturalcure', item: 'focussash', moves: ['substitute', 'rest']}]});
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move boomburst', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
});
diff --git a/test/sim/moves/bugbuzz.js b/test/sim/moves/bugbuzz.js
index 3c92484dd9..a014eebd84 100644
--- a/test/sim/moves/bugbuzz.js
+++ b/test/sim/moves/bugbuzz.js
@@ -16,7 +16,7 @@ describe('Bug Buzz', function () {
battle.setPlayer('p2', {team: [{species: "Caterpie", level: 2, ability: 'naturalcure', item: 'focussash', moves: ['substitute', 'rest']}]});
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move bugbuzz', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
});
@@ -32,6 +32,6 @@ describe('Bug Buzz [Gen 5]', function () {
]);
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move bugbuzz', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, 'focussash');
+ assert.equal(battle.p2.active[0].item, 'focussash');
});
});
diff --git a/test/sim/moves/chatter.js b/test/sim/moves/chatter.js
index c64135d277..0e1a270f02 100644
--- a/test/sim/moves/chatter.js
+++ b/test/sim/moves/chatter.js
@@ -16,7 +16,7 @@ describe('Chatter', function () {
battle.setPlayer('p2', {team: [{species: "Caterpie", level: 2, ability: 'naturalcure', item: 'focussash', moves: ['substitute', 'rest']}]});
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move chatter', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
});
@@ -32,6 +32,6 @@ describe('Chatter [Gen 5]', function () {
]);
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move chatter', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, 'focussash');
+ assert.equal(battle.p2.active[0].item, 'focussash');
});
});
diff --git a/test/sim/moves/clearsmog.js b/test/sim/moves/clearsmog.js
index 3ad1766ad6..5b5382b5c6 100644
--- a/test/sim/moves/clearsmog.js
+++ b/test/sim/moves/clearsmog.js
@@ -17,8 +17,8 @@ describe('Clear Smog', function () {
battle.makeChoices('move clearsmog', 'move calmmind');
- assert.strictEqual(battle.p2.pokemon[0].boosts['spa'], 0);
- assert.strictEqual(battle.p2.pokemon[0].boosts['spd'], 0);
+ assert.equal(battle.p2.pokemon[0].boosts['spa'], 0);
+ assert.equal(battle.p2.pokemon[0].boosts['spd'], 0);
});
it('should not remove stat boosts from a target behind a substitute', function () {
@@ -29,8 +29,8 @@ describe('Clear Smog', function () {
battle.makeChoices('move toxic', 'move substitute');
battle.makeChoices('move clearsmog', 'move calmmind');
- assert.strictEqual(battle.p2.pokemon[0].boosts['spa'], 1);
- assert.strictEqual(battle.p2.pokemon[0].boosts['spd'], 1);
+ assert.equal(battle.p2.pokemon[0].boosts['spa'], 1);
+ assert.equal(battle.p2.pokemon[0].boosts['spd'], 1);
});
it('should not remove stat boosts if the target is immune to its attack type', function () {
@@ -40,7 +40,7 @@ describe('Clear Smog', function () {
battle.makeChoices('move clearsmog', 'move irondefense');
- assert.strictEqual(battle.p2.pokemon[0].boosts['def'], 2);
+ assert.equal(battle.p2.pokemon[0].boosts['def'], 2);
});
it('should not remove stat boosts from the user', function () {
@@ -50,7 +50,7 @@ describe('Clear Smog', function () {
battle.makeChoices('move clearsmog', 'move morningsun');
- assert.strictEqual(battle.p1.pokemon[0].boosts['atk'], -1);
+ assert.equal(battle.p1.pokemon[0].boosts['atk'], -1);
});
it('should trigger before Anger Point activates during critical hits', function () {
@@ -59,11 +59,11 @@ describe('Clear Smog', function () {
battle.setPlayer('p2', {team: [{species: "Primeape", ability: 'angerpoint', moves: ['bulkup']}]});
battle.makeChoices('move focusenergy', 'move bulkup');
- assert.strictEqual(battle.p2.pokemon[0].boosts['atk'], 1);
- assert.strictEqual(battle.p2.pokemon[0].boosts['def'], 1);
+ assert.equal(battle.p2.pokemon[0].boosts['atk'], 1);
+ assert.equal(battle.p2.pokemon[0].boosts['def'], 1);
battle.makeChoices('move clearsmog', 'move bulkup');
- assert.strictEqual(battle.p2.pokemon[0].boosts['atk'], 6);
- assert.strictEqual(battle.p2.pokemon[0].boosts['def'], 0);
+ assert.equal(battle.p2.pokemon[0].boosts['atk'], 6);
+ assert.equal(battle.p2.pokemon[0].boosts['def'], 0);
});
});
diff --git a/test/sim/moves/counter.js b/test/sim/moves/counter.js
index 0062b27577..ab0b1265a5 100644
--- a/test/sim/moves/counter.js
+++ b/test/sim/moves/counter.js
@@ -29,7 +29,7 @@ describe('Counter', function () {
});
battle.makeChoices();
- assert.strictEqual(battle.p1.active[0].maxhp - battle.p1.active[0].hp, 2 * lastDamage);
+ assert.equal(battle.p1.active[0].maxhp - battle.p1.active[0].hp, 2 * lastDamage);
});
it('should fail if user is not damaged by Physical attacks this turn', function () {
@@ -97,7 +97,7 @@ describe('Mirror Coat', function () {
});
battle.makeChoices();
- assert.strictEqual(battle.p1.active[0].maxhp - battle.p1.active[0].hp, 2 * lastDamage);
+ assert.equal(battle.p1.active[0].maxhp - battle.p1.active[0].hp, 2 * lastDamage);
});
it('should fail if user is not damaged by Special attacks this turn', function () {
diff --git a/test/sim/moves/curse.js b/test/sim/moves/curse.js
index a5bc70e807..10ce405747 100644
--- a/test/sim/moves/curse.js
+++ b/test/sim/moves/curse.js
@@ -14,7 +14,7 @@ describe('Curse', function () {
battle = common.createBattle();
battle.setPlayer('p1', {team: [{species: "Gengar", ability: 'levitate', item: '', moves: ['curse']}]});
battle.setPlayer('p2', {team: [{species: "Caterpie", ability: 'shedskin', item: '', moves: ['stringshot']}]});
- assert.strictEqual(battle.p1.active[0].getRequestData().moves[0].target, 'normal');
+ assert.equal(battle.p1.active[0].getRequestData().moves[0].target, 'normal');
});
it('should request the Ghost target after the user becomes Ghost', function () {
@@ -22,9 +22,9 @@ describe('Curse', function () {
battle.setPlayer('p1', {team: [{species: "Rapidash", ability: 'levitate', item: '', moves: ['curse']}]});
battle.setPlayer('p2', {team: [{species: "Trevenant", ability: 'shedskin', item: 'laggingtail', moves: ['trickortreat']}]});
- assert.strictEqual(battle.p1.active[0].getRequestData().moves[0].target, 'self');
+ assert.equal(battle.p1.active[0].getRequestData().moves[0].target, 'self');
battle.makeChoices('auto', 'auto');
- assert.strictEqual(battle.p1.active[0].getRequestData().moves[0].target, 'normal');
+ assert.equal(battle.p1.active[0].getRequestData().moves[0].target, 'normal');
});
it('should not request a target after the user stops being Ghost', function () {
@@ -32,16 +32,16 @@ describe('Curse', function () {
battle.setPlayer('p1', {team: [{species: "Gengar", ability: 'levitate', item: '', moves: ['curse']}]});
battle.setPlayer('p2', {team: [{species: "Jellicent", ability: 'waterabsorb', item: '', moves: ['soak']}]});
- assert.strictEqual(battle.p1.active[0].getRequestData().moves[0].target, 'normal');
+ assert.equal(battle.p1.active[0].getRequestData().moves[0].target, 'normal');
battle.makeChoices('auto', 'auto');
- assert.strictEqual(battle.p1.active[0].getRequestData().moves[0].target, 'self');
+ assert.equal(battle.p1.active[0].getRequestData().moves[0].target, 'self');
});
it('should not request a target if the user is a known non-Ghost', function () {
battle = common.createBattle();
battle.setPlayer('p1', {team: [{species: "Blastoise", ability: 'torrent', item: '', moves: ['curse']}]});
battle.setPlayer('p2', {team: [{species: "Caterpie", ability: 'shedskin', item: '', moves: ['stringshot']}]});
- assert.strictEqual(battle.p1.active[0].getRequestData().moves[0].target, 'self');
+ assert.equal(battle.p1.active[0].getRequestData().moves[0].target, 'self');
});
it('should not request a target if the user is an unknown non-Ghost', function () {
@@ -54,7 +54,7 @@ describe('Curse', function () {
battle.makeChoices('move reflecttype', 'auto'); // Reflect Type!
assert.deepEqual(battle.p1.active[0].getTypes(), ["Dark"]); // Copied Zoroark's type instead of Gengar's
- assert.strictEqual(battle.p1.active[0].getRequestData().moves[0].target, 'self');
+ assert.equal(battle.p1.active[0].getRequestData().moves[0].target, 'self');
});
it('should curse a non-Ghost user with Protean', function () {
@@ -65,11 +65,11 @@ describe('Curse', function () {
battle.makeChoices('auto', 'auto');
let hps = [battle.p1.active[0].hp, battle.p2.active[0].hp];
assert.notStrictEqual(hps[0], battle.p1.active[0].maxhp); // Curse user cut its HP down + residual damage
- assert.strictEqual(hps[1], battle.p2.active[0].maxhp); // Foe unaffected
+ assert.equal(hps[1], battle.p2.active[0].maxhp); // Foe unaffected
battle.makeChoices('move spite', 'auto');
assert.notStrictEqual(hps[0], battle.p1.active[0].hp); // Curse user is hurt by residual damage
- assert.strictEqual(hps[1], battle.p2.active[0].hp); // Foe unaffected
+ assert.equal(hps[1], battle.p2.active[0].hp); // Foe unaffected
});
it('should curse the target if a Ghost user has Protean', function () {
@@ -84,7 +84,7 @@ describe('Curse', function () {
battle.makeChoices('move spite', 'auto');
// Check residual damage
- assert.strictEqual(hps[0], battle.p1.active[0].hp); // Curse user unaffected
+ assert.equal(hps[0], battle.p1.active[0].hp); // Curse user unaffected
assert.notStrictEqual(hps[1], battle.p2.active[0].hp); // Curse residual damage
});
});
@@ -129,7 +129,7 @@ describe('XY/ORAS Curse targetting when becoming Ghost the same turn', function
assert.notStrictEqual(curseUser.hp, curseUser.maxhp); // Curse user cut its HP down
if (curseUser.position === 0) {
// Expected behavior
- assert.strictEqual(cursePartner.hp, cursePartner.maxhp); // Partner unaffected by Curse
+ assert.equal(cursePartner.hp, cursePartner.maxhp); // Partner unaffected by Curse
assert.ok(foeHP[0] !== p2active[0].maxhp || foeHP[1] !== p2active[1].maxhp); // Foe afflicted by Curse
} else {
// Cartridge glitch
@@ -158,7 +158,7 @@ describe('XY/ORAS Curse targetting when becoming Ghost the same turn', function
if (allyPokemon === curseUser) {
assert.notStrictEqual(allyPokemon.hp, allyPokemon.maxhp); // Curse user cut its HP down
} else {
- assert.strictEqual(allyPokemon.hp, allyPokemon.maxhp); // Partners unaffected by Curse
+ assert.equal(allyPokemon.hp, allyPokemon.maxhp); // Partners unaffected by Curse
}
let foePokemon = p2active[i];
diff --git a/test/sim/moves/echoedvoice.js b/test/sim/moves/echoedvoice.js
index 39d845a8c4..d16b7ea9a3 100644
--- a/test/sim/moves/echoedvoice.js
+++ b/test/sim/moves/echoedvoice.js
@@ -16,7 +16,7 @@ describe('Echoed Voice', function () {
battle.setPlayer('p2', {team: [{species: "Caterpie", level: 2, ability: 'naturalcure', item: 'focussash', moves: ['substitute', 'rest']}]});
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move echoedvoice', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
});
@@ -32,6 +32,6 @@ describe('Echoed Voice [Gen 5]', function () {
]);
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move echoedvoice', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, 'focussash');
+ assert.equal(battle.p2.active[0].item, 'focussash');
});
});
diff --git a/test/sim/moves/electricterrain.js b/test/sim/moves/electricterrain.js
index 02ee2be804..7be37e6527 100644
--- a/test/sim/moves/electricterrain.js
+++ b/test/sim/moves/electricterrain.js
@@ -34,9 +34,9 @@ describe('Electric Terrain', function () {
let basePower;
let move = Dex.getMove('thunderbolt');
basePower = battle.runEvent('BasePower', battle.p1.active[0], battle.p2.active[0], move, move.basePower, true);
- assert.strictEqual(basePower, battle.modify(move.basePower, 1.5));
+ assert.equal(basePower, battle.modify(move.basePower, 1.5));
basePower = battle.runEvent('BasePower', battle.p2.active[0], battle.p1.active[0], move, move.basePower, true);
- assert.strictEqual(basePower, move.basePower);
+ assert.equal(basePower, move.basePower);
});
it('should prevent moves from putting grounded Pokemon to sleep', function () {
@@ -45,8 +45,8 @@ describe('Electric Terrain', function () {
battle.setPlayer('p2', {team: [{species: "Abra", ability: 'magicguard', moves: ['telekinesis', 'spore']}]});
battle.makeChoices('move electricterrain', 'move telekinesis');
battle.makeChoices('move spore', 'move spore');
- assert.strictEqual(battle.p1.active[0].status, 'slp');
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p1.active[0].status, 'slp');
+ assert.equal(battle.p2.active[0].status, '');
});
it('should not remove active non-volatile statuses from grounded Pokemon', function () {
@@ -54,7 +54,7 @@ describe('Electric Terrain', function () {
battle.setPlayer('p1', {team: [{species: "Jolteon", ability: 'voltabsorb', moves: ['sleeptalk', 'electricterrain']}]});
battle.setPlayer('p2', {team: [{species: "Whimsicott", ability: 'prankster', moves: ['spore']}]});
battle.makeChoices('move sleeptalk', 'move spore');
- assert.strictEqual(battle.p1.active[0].status, 'slp');
+ assert.equal(battle.p1.active[0].status, 'slp');
});
it('should prevent Yawn from putting grounded Pokemon to sleep, and cause Yawn to fail', function () {
@@ -63,7 +63,7 @@ describe('Electric Terrain', function () {
battle.setPlayer('p2', {team: [{species: "Sableye", ability: 'prankster', moves: ['yawn']}]});
battle.makeChoices('move electricterrain', 'move yawn');
battle.makeChoices('move yawn', 'move yawn');
- assert.strictEqual(battle.p1.active[0].status, '');
+ assert.equal(battle.p1.active[0].status, '');
assert.ok(!battle.p2.active[0].volatiles['yawn']);
});
@@ -74,7 +74,7 @@ describe('Electric Terrain', function () {
battle.makeChoices('move electricterrain', 'move doubleedge');
battle.makeChoices('move rest', 'move rest');
assert.notStrictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
it('should not affect Pokemon in a semi-invulnerable state', function () {
@@ -83,8 +83,8 @@ describe('Electric Terrain', function () {
battle.setPlayer('p2', {team: [{species: "Sableye", ability: 'prankster', moves: ['yawn', 'electricterrain']}]});
battle.makeChoices('move yawn', 'move yawn');
battle.makeChoices('move skydrop', 'move electricterrain');
- assert.strictEqual(battle.p1.active[0].status, 'slp');
- assert.strictEqual(battle.p2.active[0].status, 'slp');
+ assert.equal(battle.p1.active[0].status, 'slp');
+ assert.equal(battle.p2.active[0].status, 'slp');
});
it('should cause Nature Power to become Thunderbolt', function () {
@@ -93,6 +93,6 @@ describe('Electric Terrain', function () {
battle.setPlayer('p2', {team: [{species: "Shuckle", ability: 'sturdy', moves: ['naturepower']}]});
battle.makeChoices('move electricterrain', 'move naturepower');
let resultMove = toID(battle.log[battle.lastMoveLine].split('|')[3]);
- assert.strictEqual(resultMove, 'thunderbolt');
+ assert.equal(resultMove, 'thunderbolt');
});
});
diff --git a/test/sim/moves/embargo.js b/test/sim/moves/embargo.js
index 82c469ae79..22aa91cbb8 100644
--- a/test/sim/moves/embargo.js
+++ b/test/sim/moves/embargo.js
@@ -15,7 +15,7 @@ describe('Embargo', function () {
battle.setPlayer('p1', {team: [{species: "Lopunny", ability: 'limber', item: 'leftovers', moves: ['bellydrum']}]});
battle.setPlayer('p2', {team: [{species: "Giratina", ability: 'pressure', moves: ['embargo']}]});
battle.makeChoices('move bellydrum', 'move embargo');
- assert.strictEqual(battle.p1.active[0].hp, Math.ceil(battle.p1.active[0].maxhp / 2));
+ assert.equal(battle.p1.active[0].hp, Math.ceil(battle.p1.active[0].maxhp / 2));
});
it('should prevent items from being consumed', function () {
@@ -24,7 +24,7 @@ describe('Embargo', function () {
battle.setPlayer('p2', {team: [{species: "Golem", ability: 'noguard', moves: ['embargo', 'lowkick']}]});
battle.makeChoices('move bulkup', 'move embargo');
battle.makeChoices('move bulkup', 'move lowkick');
- assert.strictEqual(battle.p1.active[0].item, 'chopleberry');
+ assert.equal(battle.p1.active[0].item, 'chopleberry');
});
it('should ignore the effects of items that disable moves', function () {
@@ -32,9 +32,9 @@ describe('Embargo', function () {
battle.setPlayer('p1', {team: [{species: "Lopunny", ability: 'limber', item: 'assaultvest', moves: ['protect']}]});
battle.setPlayer('p2', {team: [{species: "Golem", ability: 'noguard', moves: ['embargo']}]});
battle.makeChoices('default', 'move embargo');
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'struggle');
+ assert.equal(battle.p1.active[0].lastMove.id, 'struggle');
battle.makeChoices('default', 'move embargo');
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'protect');
+ assert.equal(battle.p1.active[0].lastMove.id, 'protect');
});
it('should cause Fling to fail', function () {
@@ -42,7 +42,7 @@ describe('Embargo', function () {
battle.setPlayer('p1', {team: [{species: "Lopunny", ability: 'limber', item: 'seaincense', moves: ['fling']}]});
battle.setPlayer('p2', {team: [{species: "Sableye", ability: 'prankster', moves: ['embargo']}]});
battle.makeChoices('move fling', 'move embargo');
- assert.strictEqual(battle.p1.active[0].item, 'seaincense');
+ assert.equal(battle.p1.active[0].item, 'seaincense');
});
it('should not prevent Pokemon from Mega Evolving', function () {
@@ -51,6 +51,6 @@ describe('Embargo', function () {
battle.setPlayer('p2', {team: [{species: "Golem", ability: 'noguard', moves: ['embargo', 'rest']}]});
battle.makeChoices('move bulkup', 'move embargo');
battle.makeChoices('move bulkup mega', 'move rest');
- assert.strictEqual(battle.p1.active[0].template.speciesid, 'lopunnymega');
+ assert.equal(battle.p1.active[0].template.speciesid, 'lopunnymega');
});
});
diff --git a/test/sim/moves/encore.js b/test/sim/moves/encore.js
index 7daa7abed9..73c564e4c8 100644
--- a/test/sim/moves/encore.js
+++ b/test/sim/moves/encore.js
@@ -30,11 +30,11 @@ describe('Encore', function () {
// If a user's previous move was Focus Punch and it is Encored into Focus Punch while attempting to
// execute the move, the regular "you can't be hit" effect for Focus Punch will be enforced.
battle.makeChoices('move focuspunch 1, move teleport', 'move encore 1, move extremespeed 1');
- assert.strictEqual(battle.p2.active[0].hp, hp);
+ assert.equal(battle.p2.active[0].hp, hp);
// During subsequent turns the normal Focus Punch behavior applies.
battle.makeChoices('move focuspunch 1, move teleport', 'move splash, move extremespeed 1');
- assert.strictEqual(battle.p2.active[0].hp, hp);
+ assert.equal(battle.p2.active[0].hp, hp);
});
it('should make Focus Punch always succeed if it changes the user\'s decision', function () {
@@ -62,7 +62,7 @@ describe('Encore', function () {
// During subsequent turns the normal Focus Punch behavior applies.
battle.makeChoices('move focuspunch 1, move teleport', 'move splash, move extremespeed 1');
- assert.strictEqual(battle.p2.active[0].hp, hp);
+ assert.equal(battle.p2.active[0].hp, hp);
});
it('should not affect Shell Trap if the user\'s decision is not changed', function () {
@@ -114,7 +114,7 @@ describe('Encore', function () {
// attack, and will always say "'s shell trap didn't work. It doesn't matter in the case of Shell Trap if
// the user was hit before or after the Encore; Shell Trap will still always fail.
battle.makeChoices('move splash, move teleport', 'move encore 1, move quickattack 1');
- assert.strictEqual(battle.p2.active[0].hp, hp);
+ assert.equal(battle.p2.active[0].hp, hp);
// During subsequent turns the normal Shell Trap behavior applies.
battle.makeChoices('move shelltrap, move teleport', 'move splash, move quickattack 1');
diff --git a/test/sim/moves/fakeout.js b/test/sim/moves/fakeout.js
index ac48d6e0ec..0bceb5a83c 100644
--- a/test/sim/moves/fakeout.js
+++ b/test/sim/moves/fakeout.js
@@ -15,7 +15,7 @@ describe('Fake Out', function () {
battle.setPlayer('p1', {team: [{species: 'Chansey', ability: 'naturalcure', moves: ['fakeout']}]});
battle.setPlayer('p2', {team: [{species: 'Venusaur', ability: 'overgrow', moves: ['swift']}]});
battle.makeChoices('move fakeout', 'move swift');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
it('should not flinch on the second turn out', function () {
@@ -23,7 +23,7 @@ describe('Fake Out', function () {
battle.setPlayer('p1', {team: [{species: 'Chansey', ability: 'naturalcure', moves: ['fakeout']}]});
battle.setPlayer('p2', {team: [{species: 'Venusaur', ability: 'overgrow', moves: ['swift']}]});
battle.makeChoices('move fakeout', 'move swift');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
battle.makeChoices('move fakeout', 'move swift');
assert.notStrictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
@@ -39,7 +39,7 @@ describe('Fake Out', function () {
battle.makeChoices('switch 2', 'move sleeptalk');
battle.makeChoices('switch 2', 'move sleeptalk');
battle.makeChoices('move fakeout', 'move swift');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
it('should not flinch if the user has already used a Dancer move first', function () {
diff --git a/test/sim/moves/focuspunch.js b/test/sim/moves/focuspunch.js
index f3ec835d12..64958890dc 100644
--- a/test/sim/moves/focuspunch.js
+++ b/test/sim/moves/focuspunch.js
@@ -15,7 +15,7 @@ describe('Focus Punch', function () {
battle.setPlayer('p1', {team: [{species: 'Chansey', ability: 'naturalcure', moves: ['focuspunch']}]});
battle.setPlayer('p2', {team: [{species: 'Venusaur', ability: 'overgrow', moves: ['magicalleaf']}]});
battle.makeChoices('move focuspunch', 'move magicalleaf');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
it('should not cause the user to lose focus if hit by a status move', function () {
@@ -40,7 +40,7 @@ describe('Focus Punch', function () {
battle.setPlayer('p1', {team: [{species: 'Chansey', ability: 'naturalcure', moves: ['focuspunch']}]});
battle.setPlayer('p2', {team: [{species: 'Venusaur', ability: 'overgrow', moves: ['naturepower']}]});
battle.makeChoices('move focuspunch', 'move naturepower');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
it('should not cause the user to lose focus on later uses of Focus Punch if hit', function () {
@@ -48,7 +48,7 @@ describe('Focus Punch', function () {
battle.setPlayer('p1', {team: [{species: 'Chansey', ability: 'naturalcure', moves: ['focuspunch']}]});
battle.setPlayer('p2', {team: [{species: 'Venusaur', ability: 'overgrow', moves: ['magicalleaf', 'toxic']}]});
battle.makeChoices('move focuspunch', 'move magicalleaf');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
battle.makeChoices('move focuspunch', 'move toxic');
assert.notStrictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
@@ -59,8 +59,8 @@ describe('Focus Punch', function () {
[{species: 'Venusaur', ability: 'overgrow', moves: ['magicalleaf']}, {species: 'Ivysaur', ability: 'overgrow', moves: ['toxic']}],
]);
battle.makeChoices('move focuspunch 1, move softboiled', 'move magicalleaf 1, move toxic 1');
- assert.strictEqual(battle.p1.active[0].status, 'tox');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p1.active[0].status, 'tox');
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
it('should not deduct PP if the user lost focus', function () {
@@ -70,9 +70,9 @@ describe('Focus Punch', function () {
const move = battle.p1.active[0].getMoveData(Dex.getMove('focuspunch'));
battle.makeChoices('move focuspunch', 'move magicalleaf');
- assert.strictEqual(move.pp, move.maxpp);
+ assert.equal(move.pp, move.maxpp);
battle.makeChoices('move focuspunch', 'move toxic');
- assert.strictEqual(move.pp, move.maxpp - 1);
+ assert.equal(move.pp, move.maxpp - 1);
});
it('should deduct PP if the user lost focus before Gen 5', function () {
@@ -82,9 +82,9 @@ describe('Focus Punch', function () {
const move = battle.p1.active[0].getMoveData(Dex.getMove('focuspunch'));
battle.makeChoices('move focuspunch', 'move magicalleaf');
- assert.strictEqual(move.pp, move.maxpp - 1);
+ assert.equal(move.pp, move.maxpp - 1);
battle.makeChoices('move focuspunch', 'move toxic');
- assert.strictEqual(move.pp, move.maxpp - 2);
+ assert.equal(move.pp, move.maxpp - 2);
});
it('should not tighten the pokemon\'s focus when Dynamaxing', function () {
@@ -95,7 +95,7 @@ describe('Focus Punch', function () {
battle.makeChoices('move focuspunch dynamax', 'move magicalleaf');
const tighteningFocusMessage = battle.log.filter(str => str === '|-singleturn|p1a: Chansey|move: Focus Punch');
- assert.strictEqual(tighteningFocusMessage.length, 0);
+ assert.equal(tighteningFocusMessage.length, 0);
});
it('should not tighten the pokemon\'s focus when already Dynamaxed', function () {
@@ -106,7 +106,7 @@ describe('Focus Punch', function () {
battle.makeChoices('move focuspunch dynamax', 'move magicalleaf');
battle.makeChoices('move focuspunch', 'move magicalleaf');
const tighteningFocusMessage = battle.log.filter(str => str === '|-singleturn|p1a: Chansey|move: Focus Punch');
- assert.strictEqual(tighteningFocusMessage.length, 0);
+ assert.equal(tighteningFocusMessage.length, 0);
});
it('should tighten the pokemon\'s focus when not Dynamaxed', function () {
@@ -116,6 +116,6 @@ describe('Focus Punch', function () {
battle.makeChoices('move focuspunch', 'move magicalleaf');
const tighteningFocusMessage = battle.log.filter(str => str === '|-singleturn|p1a: Chansey|move: Focus Punch');
- assert.strictEqual(tighteningFocusMessage.length, 1);
+ assert.equal(tighteningFocusMessage.length, 1);
});
});
diff --git a/test/sim/moves/followme.js b/test/sim/moves/followme.js
index 8c3dfaa5c1..72e11d7dcd 100644
--- a/test/sim/moves/followme.js
+++ b/test/sim/moves/followme.js
@@ -31,7 +31,7 @@ describe('Follow Me', function () {
}
});
battle.makeChoices('move followme, move calmmind, move calmmind', 'move lowkick 2, move lowkick 2, move lowkick 2');
- assert.strictEqual(hitCount, 2);
+ assert.equal(hitCount, 2);
});
it('should not redirect self-targetting moves', function () {
@@ -45,8 +45,8 @@ describe('Follow Me', function () {
{species: 'Kadabra', ability: 'synchronize', moves: ['honeclaws']},
]});
battle.makeChoices('move followme, move softboiled', 'move honeclaws, move honeclaws');
- assert.strictEqual(battle.p1.active[0].boosts['atk'], 0);
- assert.strictEqual(battle.p2.active[0].boosts['atk'], 1);
- assert.strictEqual(battle.p2.active[1].boosts['atk'], 1);
+ assert.equal(battle.p1.active[0].boosts['atk'], 0);
+ assert.equal(battle.p2.active[0].boosts['atk'], 1);
+ assert.equal(battle.p2.active[1].boosts['atk'], 1);
});
});
diff --git a/test/sim/moves/futuresight.js b/test/sim/moves/futuresight.js
index aaa88b74ed..cd5463de21 100644
--- a/test/sim/moves/futuresight.js
+++ b/test/sim/moves/futuresight.js
@@ -15,11 +15,11 @@ describe('Future Sight', function () {
battle.setPlayer('p1', {team: [{species: "Sneasel", ability: 'innerfocus', moves: ['odorsleuth', 'futuresight', 'protect']}]});
battle.setPlayer('p2', {team: [{species: "Girafarig", ability: 'innerfocus', moves: ['odorsleuth', 'futuresight', 'protect']}]});
battle.makeChoices('move Future Sight', 'move Future Sight');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
battle.makeChoices('auto', 'auto');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
battle.makeChoices('auto', 'move Protect');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
assert.notStrictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
@@ -38,9 +38,9 @@ describe('Future Sight', function () {
battle.setPlayer('p2', {team: [{species: "Girafarig", moves: ['odorsleuth', 'futuresight', 'protect', 'sweetscent']}]});
battle.makeChoices('move Sweet Scent', 'move Sweet Scent'); // counteract imperfect accuracy
battle.makeChoices('move Future Sight', 'move Future Sight');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
battle.makeChoices('auto', 'auto');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
battle.makeChoices('auto', 'move Protect');
assert.notStrictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
assert.notStrictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
diff --git a/test/sim/moves/glare.js b/test/sim/moves/glare.js
index af315acfc0..5904b220d9 100644
--- a/test/sim/moves/glare.js
+++ b/test/sim/moves/glare.js
@@ -15,7 +15,7 @@ describe('Glare', function () {
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.strictEqual(battle.p2.active[0].status, 'par');
+ assert.equal(battle.p2.active[0].status, 'par');
});
it('should ignore natural type immunities', function () {
@@ -23,7 +23,7 @@ describe('Glare', function () {
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.strictEqual(battle.p2.active[0].status, 'par');
+ assert.equal(battle.p2.active[0].status, 'par');
});
});
@@ -38,6 +38,6 @@ describe('Glare [Gen 3]', function () {
[{species: "Gengar", ability: 'blaze', moves: ['bulkup']}],
]);
battle.makeChoices('move glare', 'move bulkup');
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
});
});
diff --git a/test/sim/moves/grassyterrain.js b/test/sim/moves/grassyterrain.js
index 123dd4deba..84c8f6afe9 100644
--- a/test/sim/moves/grassyterrain.js
+++ b/test/sim/moves/grassyterrain.js
@@ -31,10 +31,10 @@ describe('Grassy Terrain', function () {
battle.setPlayer('p1', {team: [{species: "Shaymin", ability: 'naturalcure', moves: ['grassyterrain']}]});
battle.setPlayer('p2', {team: [{species: "Shaymin-Sky", ability: 'serenegrace', moves: ['leechseed']}]});
battle.makeChoices('move grassyterrain', 'move leechseed');
- assert.strictEqual(battle.runEvent('BasePower', battle.p2.active[0], battle.p1.active[0], Dex.getMove('earthquake'), 100, true), 50);
- assert.strictEqual(battle.runEvent('BasePower', battle.p1.active[0], battle.p2.active[0], Dex.getMove('earthquake'), 100, true), 50);
- assert.strictEqual(battle.runEvent('BasePower', battle.p2.active[0], battle.p1.active[0], Dex.getMove('bulldoze'), 60, true), 30);
- assert.strictEqual(battle.runEvent('BasePower', battle.p1.active[0], battle.p2.active[0], Dex.getMove('bulldoze'), 60, true), 30);
+ assert.equal(battle.runEvent('BasePower', battle.p2.active[0], battle.p1.active[0], Dex.getMove('earthquake'), 100, true), 50);
+ assert.equal(battle.runEvent('BasePower', battle.p1.active[0], battle.p2.active[0], Dex.getMove('earthquake'), 100, true), 50);
+ assert.equal(battle.runEvent('BasePower', battle.p2.active[0], battle.p1.active[0], Dex.getMove('bulldoze'), 60, true), 30);
+ assert.equal(battle.runEvent('BasePower', battle.p1.active[0], battle.p2.active[0], Dex.getMove('bulldoze'), 60, true), 30);
});
it('should increase the base power of Grass-type attacks used by grounded Pokemon', function () {
@@ -45,9 +45,9 @@ describe('Grassy Terrain', function () {
let basePower;
let move = Dex.getMove('gigadrain');
basePower = battle.runEvent('BasePower', battle.p1.active[0], battle.p2.active[0], move, move.basePower, true);
- assert.strictEqual(basePower, battle.modify(move.basePower, 1.5));
+ assert.equal(basePower, battle.modify(move.basePower, 1.5));
basePower = battle.runEvent('BasePower', battle.p2.active[0], battle.p1.active[0], move, move.basePower, true);
- assert.strictEqual(basePower, move.basePower);
+ assert.equal(basePower, move.basePower);
});
it('should heal grounded Pokemon by 1/16 of their max HP', function () {
@@ -56,8 +56,8 @@ describe('Grassy Terrain', function () {
battle.setPlayer('p2', {team: [{species: "Magneton", ability: 'magnetpull', moves: ['magnetrise', 'dragonrage']}]});
battle.makeChoices('move grassyterrain', 'move magnetrise');
battle.makeChoices('move dragonrage', 'move dragonrage');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp - 40 + Math.floor(battle.p1.active[0].maxhp / 16));
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp - 40);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp - 40 + Math.floor(battle.p1.active[0].maxhp / 16));
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp - 40);
});
it('should not affect Pokemon in a semi-invulnerable state', function () {
@@ -66,8 +66,8 @@ describe('Grassy Terrain', function () {
battle.setPlayer('p2', {team: [{species: "Sableye", ability: 'prankster', moves: ['dragonrage', 'grassyterrain']}]});
battle.makeChoices('move dragonrage', 'move dragonrage');
battle.makeChoices('move skydrop', 'move grassyterrain');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp - 40);
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp - 40);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp - 40);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp - 40);
});
it('should cause Nature Power to become Energy Ball', function () {
@@ -76,6 +76,6 @@ describe('Grassy Terrain', function () {
battle.setPlayer('p2', {team: [{species: "Shuckle", ability: 'sturdy', moves: ['naturepower']}]});
battle.makeChoices('move grassyterrain', 'move naturepower');
let resultMove = toID(battle.log[battle.lastMoveLine].split('|')[3]);
- assert.strictEqual(resultMove, 'energyball');
+ assert.equal(resultMove, 'energyball');
});
});
diff --git a/test/sim/moves/haze.js b/test/sim/moves/haze.js
index 456bff6e6f..1664eedc23 100644
--- a/test/sim/moves/haze.js
+++ b/test/sim/moves/haze.js
@@ -17,12 +17,12 @@ describe('Haze - RBY', function () {
]);
battle.makeChoices('move agility', 'move swordsdance');
- assert.strictEqual(battle.p1.active[0].boosts.spe, 2);
- assert.strictEqual(battle.p2.active[0].boosts.atk, 2);
+ assert.equal(battle.p1.active[0].boosts.spe, 2);
+ assert.equal(battle.p2.active[0].boosts.atk, 2);
battle.makeChoices('move haze', 'move splash');
- assert.strictEqual(battle.p1.active[0].boosts.spe, 0);
- assert.strictEqual(battle.p2.active[0].boosts.atk, 0);
+ assert.equal(battle.p1.active[0].boosts.spe, 0);
+ assert.equal(battle.p2.active[0].boosts.atk, 0);
});
it('should remove opponent\'s status', function () {
@@ -32,7 +32,7 @@ describe('Haze - RBY', function () {
]);
battle.makeChoices('move thunderwave', 'move splash');
- assert.strictEqual(battle.p2.active[0].status, 'par');
+ assert.equal(battle.p2.active[0].status, 'par');
battle.makeChoices('move haze', 'move splash');
assert.notStrictEqual(battle.p2.active[0].status, 'par');
@@ -45,10 +45,10 @@ describe('Haze - RBY', function () {
]);
battle.makeChoices('move thunderwave', 'move haze');
- assert.strictEqual(battle.p2.active[0].status, 'par');
+ assert.equal(battle.p2.active[0].status, 'par');
battle.makeChoices('move thunderwave', 'move haze');
- assert.strictEqual(battle.p2.active[0].status, 'par');
+ assert.equal(battle.p2.active[0].status, 'par');
});
it('should remove focus energy', function () {
@@ -61,7 +61,7 @@ describe('Haze - RBY', function () {
assert.ok(battle.p2.active[0].volatiles['focusenergy']);
battle.makeChoices('move splash', 'move haze');
- assert.strictEqual(typeof battle.p2.active[0].volatiles['focusenergy'], 'undefined');
+ assert.equal(typeof battle.p2.active[0].volatiles['focusenergy'], 'undefined');
});
it('should remove reflect and light screen', function () {
@@ -77,7 +77,7 @@ describe('Haze - RBY', function () {
assert.ok(battle.p1.active[0].volatiles['lightscreen']);
battle.makeChoices('move haze', 'move splash');
- assert.strictEqual(typeof battle.p1.active[0].volatiles['reflect'], 'undefined');
- assert.strictEqual(typeof battle.p1.active[0].volatiles['lightscreen'], 'undefined');
+ assert.equal(typeof battle.p1.active[0].volatiles['reflect'], 'undefined');
+ assert.equal(typeof battle.p1.active[0].volatiles['lightscreen'], 'undefined');
});
});
diff --git a/test/sim/moves/healblock.js b/test/sim/moves/healblock.js
index d011b78133..5e508d921a 100644
--- a/test/sim/moves/healblock.js
+++ b/test/sim/moves/healblock.js
@@ -23,8 +23,8 @@ describe('Heal Block', function () {
battle.setPlayer('p1', {team: [{species: 'Sableye', ability: 'prankster', moves: ['healblock']}]});
battle.setPlayer('p2', {team: [{species: 'Pansage', ability: 'gluttony', item: 'berryjuice', moves: ['bellydrum']}]});
battle.makeChoices('move healblock', 'move bellydrum');
- assert.strictEqual(battle.p2.active[0].item, 'berryjuice');
- assert.strictEqual(battle.p2.active[0].hp, Math.ceil(battle.p2.active[0].maxhp / 2));
+ assert.equal(battle.p2.active[0].item, 'berryjuice');
+ assert.equal(battle.p2.active[0].hp, Math.ceil(battle.p2.active[0].maxhp / 2));
});
it('should disable the use of healing moves', function () {
@@ -40,7 +40,7 @@ describe('Heal Block', function () {
battle.setPlayer('p1', {team: [{species: 'Sableye', ability: 'prankster', moves: ['healblock']}]});
battle.setPlayer('p2', {team: [{species: 'Venusaur', ability: 'overgrow', moves: ['gigadrain']}]});
battle.makeChoices('move healblock', 'move gigadrain');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
it('should prevent abilities from recovering HP', function () {
@@ -50,7 +50,7 @@ describe('Heal Block', function () {
battle.makeChoices('move healblock', 'move bellydrum');
let hp = battle.p2.active[0].hp;
battle.makeChoices('move surf', 'move calmmind');
- assert.strictEqual(battle.p2.active[0].hp, hp);
+ assert.equal(battle.p2.active[0].hp, hp);
});
it('should prevent Leech Seed from healing HP', function () {
@@ -60,7 +60,7 @@ describe('Heal Block', function () {
battle.makeChoices('move healblock', 'move substitute');
let hp = battle.p2.active[0].hp;
battle.makeChoices('move healblock', 'move leechseed');
- assert.strictEqual(battle.p2.active[0].hp, hp);
+ assert.equal(battle.p2.active[0].hp, hp);
assert.notStrictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
@@ -96,8 +96,8 @@ describe('Heal Block [Gen 5]', function () {
[{species: 'Pansage', ability: 'gluttony', item: 'sitrusberry', moves: ['bellydrum']}],
]);
battle.makeChoices('move healblock', 'move bellydrum');
- assert.strictEqual(battle.p2.active[0].item, 'sitrusberry');
- assert.strictEqual(battle.p2.active[0].hp, Math.ceil(battle.p2.active[0].maxhp / 2));
+ assert.equal(battle.p2.active[0].item, 'sitrusberry');
+ assert.equal(battle.p2.active[0].hp, Math.ceil(battle.p2.active[0].maxhp / 2));
});
it('should disable the use of healing moves', function () {
@@ -117,7 +117,7 @@ describe('Heal Block [Gen 5]', function () {
battle.makeChoices('move healblock', 'move bellydrum');
let hp = battle.p2.active[0].hp;
battle.makeChoices('move surf', 'move calmmind');
- assert.strictEqual(battle.p2.active[0].hp, hp);
+ assert.equal(battle.p2.active[0].hp, hp);
});
it('should prevent draining moves from healing HP', function () {
@@ -128,7 +128,7 @@ describe('Heal Block [Gen 5]', function () {
battle.makeChoices('move healblock', 'move substitute');
let hp = battle.p2.active[0].hp;
battle.makeChoices('move healblock', 'move gigadrain');
- assert.strictEqual(battle.p2.active[0].hp, hp);
+ assert.equal(battle.p2.active[0].hp, hp);
assert.notStrictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
@@ -139,7 +139,7 @@ describe('Heal Block [Gen 5]', function () {
]);
let hp = battle.p2.active[0].hp;
battle.makeChoices('move healblock', 'move leechseed');
- assert.strictEqual(battle.p2.active[0].hp, hp);
+ assert.equal(battle.p2.active[0].hp, hp);
assert.notStrictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
});
@@ -175,7 +175,7 @@ describe('Heal Block [Gen 4]', function () {
battle.makeChoices('move healblock', 'move substitute');
let hp = battle.p2.active[0].hp;
battle.makeChoices('move healblock', 'move gigadrain');
- assert.strictEqual(battle.p2.active[0].hp, hp);
+ assert.equal(battle.p2.active[0].hp, hp);
assert.notStrictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
@@ -189,7 +189,7 @@ describe('Heal Block [Gen 4]', function () {
assert.notStrictEqual(battle.p2.active[0].hp, 1);
battle.makeChoices('move healblock', 'switch 2');
battle.makeChoices('move shadowball', 'move endure');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
assert.notStrictEqual(battle.p2.active[0].hp, 1);
});
@@ -212,7 +212,7 @@ describe('Heal Block [Gen 4]', function () {
battle.makeChoices('move healblock', 'move substitute');
let hp = battle.p2.active[0].hp;
battle.makeChoices('move healblock', 'move leechseed');
- assert.strictEqual(battle.p2.active[0].hp, hp);
+ assert.equal(battle.p2.active[0].hp, hp);
assert.notStrictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
});
diff --git a/test/sim/moves/healingwish.js b/test/sim/moves/healingwish.js
index 8188ac6b88..a5edd14268 100644
--- a/test/sim/moves/healingwish.js
+++ b/test/sim/moves/healingwish.js
@@ -31,8 +31,8 @@ describe('Healing Wish', function () {
// sand happens after Jirachi faints and before any switch-in
battle.makeChoices('switch Caterpie', ''); // Caterpie heals before taking SR damage
- assert.strictEqual(battle.p1.active[0].hp, 174);
- assert.strictEqual(battle.p1.active[0].moveSlots[0].pp, 63);
+ assert.equal(battle.p1.active[0].hp, 174);
+ assert.equal(battle.p1.active[0].moveSlots[0].pp, 63);
});
it('should not be consumed if a switch-in is fully healed already', function () {
@@ -72,7 +72,7 @@ describe('Healing Wish', function () {
// Caterpie gets healed by Healing Wish triggered by Ally Switch
battle.makeChoices('move Ally Switch, move String Shot', 'move Sleep Talk, move Protect');
- assert.strictEqual(battle.p1.active[0].hp, 231); // Caterpie start in slot 1 -> Ally Switch-ed to slot 0
+ assert.equal(battle.p1.active[0].hp, 231); // Caterpie start in slot 1 -> Ally Switch-ed to slot 0
assert.false(battle.p1.slotConditions[0]['healingwish']);
});
@@ -99,11 +99,11 @@ describe('Healing Wish', function () {
battle.makeChoices('move Healing Wish', 'move Seismic Toss');
battle.makeChoices('switch Caterpie', ''); // Caterpie faints from hazards
- assert.strictEqual(battle.p1.active[0].hp, 0);
+ assert.equal(battle.p1.active[0].hp, 0);
battle.makeChoices('switch Raichu', ''); // Raichu fully heals and takes stoss + Sandstorm damage
- assert.strictEqual(battle.turn, 6);
- assert.strictEqual(battle.p1.active[0].hp, 145); // after stoss + Sandstorm
- assert.strictEqual(battle.p1.active[0].moveSlots[0].pp, 63);
+ assert.equal(battle.turn, 6);
+ assert.equal(battle.p1.active[0].hp, 145); // after stoss + Sandstorm
+ assert.equal(battle.p1.active[0].moveSlots[0].pp, 63);
});
});
diff --git a/test/sim/moves/hypervoice.js b/test/sim/moves/hypervoice.js
index 354cf23fee..7d1a17f356 100644
--- a/test/sim/moves/hypervoice.js
+++ b/test/sim/moves/hypervoice.js
@@ -16,7 +16,7 @@ describe('Hyper Voice', function () {
battle.setPlayer('p2', {team: [{species: "Caterpie", level: 2, ability: 'naturalcure', item: 'focussash', moves: ['substitute', 'rest']}]});
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move hypervoice', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
});
@@ -32,6 +32,6 @@ describe('Hyper Voice [Gen 5]', function () {
]);
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move hypervoice', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, 'focussash');
+ assert.equal(battle.p2.active[0].item, 'focussash');
});
});
diff --git a/test/sim/moves/ingrain.js b/test/sim/moves/ingrain.js
index cd2aa81aca..830d96aeeb 100644
--- a/test/sim/moves/ingrain.js
+++ b/test/sim/moves/ingrain.js
@@ -20,21 +20,21 @@ describe('Ingrain', function () {
{species: 'Miltank', ability: 'thickfat', moves: ['seismictoss', 'protect']},
]});
battle.makeChoices('move ingrain', 'move seismictoss');
- assert.strictEqual(battle.p1.active[0].hp, Math.floor(battle.p1.active[0].maxhp * 17 / 16) - 100);
+ assert.equal(battle.p1.active[0].hp, Math.floor(battle.p1.active[0].maxhp * 17 / 16) - 100);
// should be passed by Baton Pass
battle.makeChoices('move batonpass', 'move seismictoss');
battle.makeChoices('switch 2', '');
- assert.strictEqual(battle.p1.active[0].hp, Math.floor(battle.p1.active[0].maxhp * 17 / 16) - 100);
+ assert.equal(battle.p1.active[0].hp, Math.floor(battle.p1.active[0].maxhp * 17 / 16) - 100);
// should not be passed by U-turn
battle.makeChoices('move uturn', 'move seismictoss');
battle.makeChoices('switch 2', '');
- assert.strictEqual(battle.p1.active[0].hp, Math.floor(battle.p1.active[0].maxhp * 17 / 16) - 100);
+ assert.equal(battle.p1.active[0].hp, Math.floor(battle.p1.active[0].maxhp * 17 / 16) - 100);
// should be gone after switching out and back in
battle.makeChoices('switch 2', 'move protect');
- assert.strictEqual(battle.p1.active[0].hp, Math.floor(battle.p1.active[0].maxhp * 17 / 16) - 200);
+ assert.equal(battle.p1.active[0].hp, Math.floor(battle.p1.active[0].maxhp * 17 / 16) - 200);
});
it('should prevent the user from being forced out or switching out', function () {
@@ -45,9 +45,9 @@ describe('Ingrain', function () {
]});
battle.setPlayer('p2', {team: [{species: 'Arcanine', ability: 'flashfire', moves: ['sleeptalk', 'roar']}]});
battle.makeChoices('move ingrain', 'move roar');
- assert.strictEqual(battle.p1.active[0].speciesid, 'cradily');
+ assert.equal(battle.p1.active[0].speciesid, 'cradily');
assert.trapped(() => battle.makeChoices('switch pikachu', 'move sleeptalk'));
- assert.strictEqual(battle.p1.active[0].speciesid, 'cradily');
+ assert.equal(battle.p1.active[0].speciesid, 'cradily');
});
it('should remove the users\' Ground immunities', function () {
diff --git a/test/sim/moves/knockoff.js b/test/sim/moves/knockoff.js
index bd31b430f9..782eabbf00 100644
--- a/test/sim/moves/knockoff.js
+++ b/test/sim/moves/knockoff.js
@@ -15,7 +15,7 @@ describe('Knock Off', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', moves: ['knockoff']}]});
battle.setPlayer('p2', {team: [{species: "Blissey", ability: 'naturalcure', item: 'shedshell', moves: ['softboiled']}]});
battle.makeChoices('move knockoff', 'move softboiled');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
it('should not remove items when hitting Sub', function () {
@@ -23,7 +23,7 @@ describe('Knock Off', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'noability', moves: ['knockoff']}]});
battle.setPlayer('p2', {team: [{species: "Ninjask", ability: 'noability', item: 'shedshell', moves: ['substitute']}]});
battle.makeChoices();
- assert.strictEqual(battle.p2.active[0].item, 'shedshell');
+ assert.equal(battle.p2.active[0].item, 'shedshell');
});
it('should not remove plates from Arceus', function () {
@@ -31,7 +31,7 @@ describe('Knock Off', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', moves: ['knockoff']}]});
battle.setPlayer('p2', {team: [{species: "Arceus", ability: 'download', item: 'flameplate', moves: ['swordsdance']}]});
battle.makeChoices('move knockoff', 'move swordsdance');
- assert.strictEqual(battle.p2.active[0].item, 'flameplate');
+ assert.equal(battle.p2.active[0].item, 'flameplate');
});
it('should not remove drives from Genesect', function () {
@@ -39,7 +39,7 @@ describe('Knock Off', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', moves: ['knockoff']}]});
battle.setPlayer('p2', {team: [{species: "Genesect", ability: 'download', item: 'dousedrive', moves: ['shiftgear']}]});
battle.makeChoices('move knockoff', 'move shiftgear');
- assert.strictEqual(battle.p2.active[0].item, 'dousedrive');
+ assert.equal(battle.p2.active[0].item, 'dousedrive');
});
it('should not remove correctly held mega stones', function () {
@@ -47,7 +47,7 @@ describe('Knock Off', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', moves: ['knockoff']}]});
battle.setPlayer('p2', {team: [{species: "Scizor", ability: 'technician', item: 'scizorite', moves: ['swordsdance']}]});
battle.makeChoices('move knockoff', 'move swordsdance');
- assert.strictEqual(battle.p2.active[0].item, 'scizorite');
+ assert.equal(battle.p2.active[0].item, 'scizorite');
});
it('should remove wrong mega stones', function () {
@@ -55,7 +55,7 @@ describe('Knock Off', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', moves: ['knockoff']}]});
battle.setPlayer('p2', {team: [{species: "Scizor", ability: 'technician', item: 'audinite', moves: ['swordsdance']}]});
battle.makeChoices('move knockoff', 'move swordsdance');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
it('should not remove items if the user faints mid-move', function () {
@@ -63,6 +63,6 @@ describe('Knock Off', function () {
battle.setPlayer('p1', {team: [{species: "Shedinja", ability: 'wonderguard', moves: ['knockoff']}]});
battle.setPlayer('p2', {team: [{species: "Ferrothorn", ability: 'ironbarbs', item: 'rockyhelmet', moves: ['curse']}]});
battle.makeChoices('move knockoff', 'move curse');
- assert.strictEqual(battle.p2.active[0].item, 'rockyhelmet');
+ assert.equal(battle.p2.active[0].item, 'rockyhelmet');
});
});
diff --git a/test/sim/moves/magicroom.js b/test/sim/moves/magicroom.js
index a383b54d38..6d6cc1c583 100644
--- a/test/sim/moves/magicroom.js
+++ b/test/sim/moves/magicroom.js
@@ -15,7 +15,7 @@ describe('Magic Room', function () {
battle.setPlayer('p1', {team: [{species: "Lopunny", ability: 'limber', item: 'leftovers', moves: ['bellydrum']}]});
battle.setPlayer('p2', {team: [{species: "Giratina", ability: 'pressure', moves: ['magicroom']}]});
battle.makeChoices('move bellydrum', 'move magicroom');
- assert.strictEqual(battle.p1.active[0].hp, Math.ceil(battle.p1.active[0].maxhp / 2));
+ assert.equal(battle.p1.active[0].hp, Math.ceil(battle.p1.active[0].maxhp / 2));
});
it('should prevent items from being consumed', function () {
@@ -23,7 +23,7 @@ describe('Magic Room', function () {
battle.setPlayer('p1', {team: [{species: "Lopunny", ability: 'limber', item: 'chopleberry', moves: ['magicroom']}]});
battle.setPlayer('p2', {team: [{species: "Golem", ability: 'noguard', moves: ['lowkick']}]});
battle.makeChoices('move magicroom', 'move lowkick');
- assert.strictEqual(battle.p1.active[0].item, 'chopleberry');
+ assert.equal(battle.p1.active[0].item, 'chopleberry');
});
it('should ignore the effects of items that disable moves', function () {
@@ -31,9 +31,9 @@ describe('Magic Room', function () {
battle.setPlayer('p1', {team: [{species: "Lopunny", ability: 'limber', item: 'assaultvest', moves: ['protect']}]});
battle.setPlayer('p2', {team: [{species: "Golem", ability: 'noguard', moves: ['magicroom']}]});
battle.makeChoices('default', 'move magicroom');
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'struggle');
+ assert.equal(battle.p1.active[0].lastMove.id, 'struggle');
battle.makeChoices('default', 'move magicroom');
- assert.strictEqual(battle.p1.active[0].lastMove.id, 'protect');
+ assert.equal(battle.p1.active[0].lastMove.id, 'protect');
});
it('should cause Fling to fail', function () {
@@ -41,7 +41,7 @@ describe('Magic Room', function () {
battle.setPlayer('p1', {team: [{species: "Lopunny", ability: 'limber', item: 'seaincense', moves: ['fling']}]});
battle.setPlayer('p2', {team: [{species: "Sableye", ability: 'prankster', moves: ['magicroom']}]});
battle.makeChoices('move fling', 'move magicroom');
- assert.strictEqual(battle.p1.active[0].item, 'seaincense');
+ assert.equal(battle.p1.active[0].item, 'seaincense');
});
it('should not prevent Pokemon from Mega Evolving', function () {
@@ -50,7 +50,7 @@ describe('Magic Room', function () {
battle.setPlayer('p2', {team: [{species: "Golem", ability: 'noguard', moves: ['magicroom', 'rest']}]});
battle.makeChoices('move bulkup', 'move magicroom');
battle.makeChoices('move bulkup mega', 'move rest');
- assert.strictEqual(battle.p1.active[0].template.speciesid, 'lopunnymega');
+ assert.equal(battle.p1.active[0].template.speciesid, 'lopunnymega');
});
it('should not prevent Primal Reversion', function () {
@@ -62,6 +62,6 @@ describe('Magic Room', function () {
battle.setPlayer('p2', {team: [{species: "Meowstic", ability: 'prankster', moves: ['magicroom']}]});
battle.makeChoices('move voltswitch', 'move magicroom');
battle.makeChoices('switch groudon', '');
- assert.strictEqual(battle.p1.active[0].template.speciesid, 'groudonprimal');
+ assert.equal(battle.p1.active[0].template.speciesid, 'groudonprimal');
});
});
diff --git a/test/sim/moves/mistyterrain.js b/test/sim/moves/mistyterrain.js
index 21c5005ad5..8f6492e8e0 100644
--- a/test/sim/moves/mistyterrain.js
+++ b/test/sim/moves/mistyterrain.js
@@ -34,9 +34,9 @@ describe('Misty Terrain', function () {
let basePower;
let move = Dex.getMove('dragonpulse');
basePower = battle.runEvent('BasePower', battle.p2.active[0], battle.p1.active[0], move, move.basePower, true);
- assert.strictEqual(basePower, battle.modify(move.basePower, 0.5));
+ assert.equal(basePower, battle.modify(move.basePower, 0.5));
basePower = battle.runEvent('BasePower', battle.p1.active[0], battle.p2.active[0], move, move.basePower, true);
- assert.strictEqual(basePower, move.basePower);
+ assert.equal(basePower, move.basePower);
});
it('should prevent moves from setting non-volatile status on grounded Pokemon', function () {
@@ -45,8 +45,8 @@ describe('Misty Terrain', function () {
battle.setPlayer('p2', {team: [{species: "Machamp", ability: 'noguard', item: 'airballoon', moves: ['bulkup', 'toxic']}]});
battle.makeChoices('move mistyterrain', 'move bulkup');
battle.makeChoices('move toxic', 'move toxic');
- assert.strictEqual(battle.p1.active[0].status, '');
- assert.strictEqual(battle.p2.active[0].status, 'tox');
+ assert.equal(battle.p1.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, 'tox');
});
it('should not remove active non-volatile statuses from grounded Pokemon', function () {
@@ -54,7 +54,7 @@ describe('Misty Terrain', function () {
battle.setPlayer('p1', {team: [{species: "Florges", ability: 'symbiosis', moves: ['mistyterrain']}]});
battle.setPlayer('p2', {team: [{species: "Crobat", ability: 'infiltrator', moves: ['toxic']}]});
battle.makeChoices('move mistyterrain', 'move toxic');
- assert.strictEqual(battle.p1.active[0].status, 'tox');
+ assert.equal(battle.p1.active[0].status, 'tox');
});
it('should prevent Yawn from putting grounded Pokemon to sleep, but not cause Yawn to fail', function () {
@@ -63,9 +63,9 @@ describe('Misty Terrain', function () {
battle.setPlayer('p2', {team: [{species: "Sableye", ability: 'prankster', moves: ['yawn']}]});
battle.makeChoices('move mistyterrain', 'move yawn');
battle.makeChoices('move yawn', 'move yawn');
- assert.strictEqual(battle.p1.active[0].status, '');
+ assert.equal(battle.p1.active[0].status, '');
let dataLine = battle.log[battle.lastMoveLine + 1].split('|');
- assert.strictEqual(dataLine[1], '-start');
+ assert.equal(dataLine[1], '-start');
assert.ok(toID(dataLine[3]).endsWith('yawn'));
});
@@ -76,7 +76,7 @@ describe('Misty Terrain', function () {
battle.makeChoices('move mistyterrain', 'move doubleedge');
battle.makeChoices('move rest', 'move rest');
assert.notStrictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
it('should not affect Pokemon in a semi-invulnerable state', function () {
@@ -85,8 +85,8 @@ describe('Misty Terrain', function () {
battle.setPlayer('p2', {team: [{species: "Sableye", ability: 'prankster', moves: ['yawn', 'mistyterrain']}]});
battle.makeChoices('move yawn', 'move yawn');
battle.makeChoices('move skydrop', 'move mistyterrain');
- assert.strictEqual(battle.p1.active[0].status, 'slp');
- assert.strictEqual(battle.p2.active[0].status, 'slp');
+ assert.equal(battle.p1.active[0].status, 'slp');
+ assert.equal(battle.p2.active[0].status, 'slp');
});
it('should cause Nature Power to become Moonblast', function () {
@@ -95,6 +95,6 @@ describe('Misty Terrain', function () {
battle.setPlayer('p2', {team: [{species: "Shuckle", ability: 'sturdy', moves: ['naturepower']}]});
battle.makeChoices('move mistyterrain', 'move naturepower');
let resultMove = toID(battle.log[battle.lastMoveLine].split('|')[3]);
- assert.strictEqual(resultMove, 'moonblast');
+ assert.equal(resultMove, 'moonblast');
});
});
diff --git a/test/sim/moves/painsplit.js b/test/sim/moves/painsplit.js
index a179d3cd12..84fb7d3bab 100644
--- a/test/sim/moves/painsplit.js
+++ b/test/sim/moves/painsplit.js
@@ -15,7 +15,7 @@ describe('Pain Split', function () {
battle.setPlayer('p1', {team: [{species: 'Shedinja', ability: 'wonderguard', moves: ['painsplit']}]});
battle.setPlayer('p2', {team: [{species: 'Arceus', ability: 'multitype', moves: ['judgment']}]});
battle.makeChoices('move painsplit', 'move judgment');
- assert.strictEqual(battle.p2.active[0].hp, (battle.p2.active[0].maxhp + 1) / 2);
+ assert.equal(battle.p2.active[0].hp, (battle.p2.active[0].maxhp + 1) / 2);
});
it('should calculate HP changes against a dynamaxed target properly', function () {
@@ -29,7 +29,7 @@ describe('Pain Split', function () {
battle.p1.active[0].sethp(160); // non-dynamaxed
battle.p2.active[0].sethp(174); // dynamaxed
battle.makeChoices('move painsplit', 'move doubleedge');
- assert.strictEqual(battle.p1.active[0].hp, 123, 'non-dynamaxed');
- assert.strictEqual(battle.p2.active[0].hp, 210, 'dynamaxed');
+ assert.equal(battle.p1.active[0].hp, 123, 'non-dynamaxed');
+ assert.equal(battle.p2.active[0].hp, 210, 'dynamaxed');
});
});
diff --git a/test/sim/moves/partingshot.js b/test/sim/moves/partingshot.js
index ce5cf9a47a..8ae698c3a8 100644
--- a/test/sim/moves/partingshot.js
+++ b/test/sim/moves/partingshot.js
@@ -22,23 +22,23 @@ describe(`Parting Shot`, function () {
const p1 = battle.p1;
const p2 = battle.p2;
battle.makeChoices('move partingshot', 'move splash');
- assert.strictEqual(battle.requestState, 'move');
+ assert.equal(battle.requestState, 'move');
battle.makeChoices('move partingshot', 'switch 2'); // Solgaleo
- assert.strictEqual(battle.requestState, 'move');
+ assert.equal(battle.requestState, 'move');
battle.makeChoices('move partingshot', 'switch 3'); // Torkoal
- assert.strictEqual(battle.requestState, 'move');
+ assert.equal(battle.requestState, 'move');
battle.makeChoices('move partingshot', 'switch 4'); // Shaymin
- assert.strictEqual(battle.requestState, 'move');
+ assert.equal(battle.requestState, 'move');
battle.makeChoices('move splash', 'switch 5'); // Kingler
p2.active[0].boostBy({spa: -6});
battle.makeChoices('move partingshot', 'move splash');
- assert.strictEqual(battle.requestState, 'move');
+ assert.equal(battle.requestState, 'move');
battle.makeChoices('move splash', 'switch 6'); // Spinda
p2.active[0].boostBy({atk: 6, spa: 6});
battle.makeChoices('move partingshot', 'move splash');
- assert.strictEqual(battle.requestState, 'move');
+ assert.equal(battle.requestState, 'move');
p1.active[0].boostBy({atk: -6, spa: -6});
battle.makeChoices('move splash', 'move partingshot'); // Parting Shot against Silvally this time
- assert.strictEqual(battle.requestState, 'move');
+ assert.equal(battle.requestState, 'move');
});
});
diff --git a/test/sim/moves/pursuit.js b/test/sim/moves/pursuit.js
index 56c37414be..b11d802941 100644
--- a/test/sim/moves/pursuit.js
+++ b/test/sim/moves/pursuit.js
@@ -54,7 +54,7 @@ describe(`Pursuit`, function () {
let clefable = battle.p2.pokemon[0];
let hpBeforeSwitch = clefable.hp;
battle.makeChoices('switch 2', 'switch 2');
- assert.strictEqual(hpBeforeSwitch, clefable.hp);
+ assert.equal(hpBeforeSwitch, clefable.hp);
});
it(`should not double in power or activate before a switch if targeting an ally`, function () {
diff --git a/test/sim/moves/quash.js b/test/sim/moves/quash.js
index 53d36c0161..283d004dc1 100644
--- a/test/sim/moves/quash.js
+++ b/test/sim/moves/quash.js
@@ -23,7 +23,7 @@ describe('Quash', function () {
]});
battle.makeChoices('move quash 2, move earthquake', 'move voltswitch 2, move swift');
battle.makeChoices('', 'switch 3, pass'); // Volt Switch
- assert.strictEqual(battle.log[battle.lastMoveLine].split('|')[3], 'Swift');
+ assert.equal(battle.log[battle.lastMoveLine].split('|')[3], 'Swift');
});
it('should not cause the target to move again if it has already moved', function () {
diff --git a/test/sim/moves/ragepowder.js b/test/sim/moves/ragepowder.js
index 0dd5a27e85..0728fa951d 100644
--- a/test/sim/moves/ragepowder.js
+++ b/test/sim/moves/ragepowder.js
@@ -39,9 +39,9 @@ describe('Rage Powder', function () {
return Sim.Pokemon.prototype.damage.apply(this, args);
};
battle.makeChoices('move ragepowder, move growth, move growth', 'move absorb 2, move absorb 2, move absorb 2');
- assert.strictEqual(hitCount[0], 2);
- assert.strictEqual(hitCount[1], 1);
- assert.strictEqual(hitCount[2], 0);
+ assert.equal(hitCount[0], 2);
+ assert.equal(hitCount[1], 1);
+ assert.equal(hitCount[2], 0);
});
it('should not affect Pokemon with Powder immunities', function () {
@@ -70,8 +70,8 @@ describe('Rage Powder', function () {
return Sim.Pokemon.prototype.damage.apply(this, args);
};
battle.makeChoices('move growth, move ragepowder, move growth', 'move absorb 3, move absorb 1, move absorb 1');
- assert.strictEqual(hitCount[0], 2);
- assert.strictEqual(hitCount[1], 1);
- assert.strictEqual(hitCount[2], 0);
+ assert.equal(hitCount[0], 2);
+ assert.equal(hitCount[1], 1);
+ assert.equal(hitCount[2], 0);
});
});
diff --git a/test/sim/moves/reflecttype.js b/test/sim/moves/reflecttype.js
index 29eb36466b..a24c82df51 100644
--- a/test/sim/moves/reflecttype.js
+++ b/test/sim/moves/reflecttype.js
@@ -22,10 +22,10 @@ describe('Reflect Type', function () {
battle.setPlayer('p1', {team: [{species: 'Latias', ability: 'levitate', item: 'laggingtail', moves: ['reflecttype', 'trickortreat']}]});
battle.setPlayer('p2', {team: [{species: 'Moltres', ability: 'pressure', moves: ['burnup']}]});
battle.makeChoices('move reflecttype', 'move burnup');
- assert.strictEqual(battle.p1.active[0].getTypes().join('/'), 'Flying');
+ assert.equal(battle.p1.active[0].getTypes().join('/'), 'Flying');
battle.makeChoices('move trickortreat', 'move burnup');
battle.makeChoices('move reflecttype', 'move burnup');
- assert.strictEqual(battle.p1.active[0].getTypes().join('/'), 'Flying/Ghost');
+ assert.equal(battle.p1.active[0].getTypes().join('/'), 'Flying/Ghost');
});
it('should turn the "???" type into "Normal" when used against a Pokemon whose type is only "???" and an added type', function () {
@@ -34,6 +34,6 @@ describe('Reflect Type', function () {
battle.setPlayer('p2', {team: [{species: 'Arcanine', ability: 'intimidate', moves: ['burnup']}]});
battle.makeChoices('move trickortreat', 'move burnup');
battle.makeChoices('move reflecttype', 'move burnup');
- assert.strictEqual(battle.p1.active[0].getTypes().join('/'), 'Normal/Ghost');
+ assert.equal(battle.p1.active[0].getTypes().join('/'), 'Normal/Ghost');
});
});
diff --git a/test/sim/moves/relicsong.js b/test/sim/moves/relicsong.js
index 16ecac8a03..e59e52025c 100644
--- a/test/sim/moves/relicsong.js
+++ b/test/sim/moves/relicsong.js
@@ -15,7 +15,7 @@ describe('Relic Song', function () {
battle.setPlayer('p1', {team: [{species: "Meloetta", ability: 'serenegrace', moves: ['relicsong']}]});
battle.setPlayer('p2', {team: [{species: "Registeel", ability: 'clearbody', moves: ['rest']}]});
battle.makeChoices('move relicsong', 'move rest');
- assert.strictEqual(battle.p1.active[0].template.speciesid, 'meloettapirouette');
+ assert.equal(battle.p1.active[0].template.speciesid, 'meloettapirouette');
});
it('should transform Meloetta-Pirouette into its Aria forme', function () {
@@ -23,7 +23,7 @@ describe('Relic Song', function () {
battle.setPlayer('p1', {team: [{species: "Meloetta-Pirouette", ability: 'serenegrace', moves: ['relicsong']}]});
battle.setPlayer('p2', {team: [{species: "Registeel", ability: 'clearbody', moves: ['rest']}]});
battle.makeChoices('move relicsong', 'move rest');
- assert.strictEqual(battle.p1.active[0].template.speciesid, 'meloetta');
+ assert.equal(battle.p1.active[0].template.speciesid, 'meloetta');
});
it('should pierce through substitutes', function () {
@@ -32,7 +32,7 @@ describe('Relic Song', function () {
battle.setPlayer('p2', {team: [{species: "Caterpie", level: 2, ability: 'naturalcure', item: 'focussash', moves: ['substitute', 'rest']}]});
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move relicsong', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
});
@@ -48,7 +48,7 @@ describe('Relic Song [Gen 5]', function () {
]);
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move relicsong', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, 'focussash');
+ assert.equal(battle.p2.active[0].item, 'focussash');
});
it('should transform Meloetta into its Pirouette forme even if it hits a substitute', function () {
@@ -57,6 +57,6 @@ describe('Relic Song [Gen 5]', function () {
[{species: "Registeel", ability: 'prankster', moves: ['substitute']}],
]);
battle.makeChoices('move relicsong', 'move substitute');
- assert.strictEqual(battle.p1.active[0].template.speciesid, 'meloettapirouette');
+ assert.equal(battle.p1.active[0].template.speciesid, 'meloettapirouette');
});
});
diff --git a/test/sim/moves/rollout.js b/test/sim/moves/rollout.js
index 9277ccf32b..383145c2f1 100644
--- a/test/sim/moves/rollout.js
+++ b/test/sim/moves/rollout.js
@@ -25,7 +25,7 @@ for (const move of moves) {
let count = 0;
battle.onEvent('BasePower', battle.format, function (basePower) {
count++;
- assert.strictEqual(basePower, ebp);
+ assert.equal(basePower, ebp);
if (count % 5 === 0) {
ebp = 30;
} else {
@@ -36,7 +36,7 @@ for (const move of moves) {
for (let i = 0; i < 8; i++) {
battle.makeChoices('move ' + id, 'move recover');
}
- assert.strictEqual(count, 8);
+ assert.equal(count, 8);
});
it('should reset its Base Power if the move misses', function () {
@@ -59,14 +59,14 @@ for (const move of moves) {
}
});
battle.onEvent('BasePower', battle.format, function (basePower) {
- assert.strictEqual(basePower, ebp);
+ assert.equal(basePower, ebp);
ebp *= 2;
});
for (let i = 0; i < 5; i++) {
battle.makeChoices('move ' + id, 'move recover');
}
- assert.strictEqual(count, 5);
+ assert.equal(count, 5);
});
it('should reset its Base Power if the Pokemon is immobilized', function () {
@@ -87,14 +87,14 @@ for (const move of moves) {
}
});
battle.onEvent('BasePower', battle.format, function (basePower) {
- assert.strictEqual(basePower, ebp);
+ assert.equal(basePower, ebp);
ebp *= 2;
});
for (let i = 0; i < 5; i++) {
battle.makeChoices('move ' + id, 'move recover');
}
- assert.strictEqual(count, 5);
+ assert.equal(count, 5);
});
it('should have double Base Power if the Pokemon used Defense Curl earlier', function () {
@@ -105,13 +105,13 @@ for (const move of moves) {
let runCount = 0;
battle.onEvent('BasePower', battle.format, function (basePower) {
- assert.strictEqual(basePower, 60);
+ assert.equal(basePower, 60);
runCount++;
});
battle.makeChoices('move defensecurl', 'move recover');
battle.makeChoices('move ' + id, 'move recover');
- assert.strictEqual(runCount, 1);
+ assert.equal(runCount, 1);
});
it('should not be affected by Parental Bond', function () {
@@ -122,12 +122,12 @@ for (const move of moves) {
let hitCount = 0;
battle.onEvent('BasePower', battle.format, function (basePower) {
- assert.strictEqual(basePower, 30);
+ assert.equal(basePower, 30);
hitCount++;
});
battle.makeChoices('move ' + id, 'move recover');
- assert.strictEqual(hitCount, 1);
+ assert.equal(hitCount, 1);
});
});
}
diff --git a/test/sim/moves/roost.js b/test/sim/moves/roost.js
index 2693ee0783..0ea62316a0 100644
--- a/test/sim/moves/roost.js
+++ b/test/sim/moves/roost.js
@@ -25,7 +25,7 @@ describe('Roost', function () {
battle.setPlayer('p2', {team: [{species: "Dragonite", ability: 'multiscale', moves: ['roost', 'dragondance']}]});
battle.makeChoices('move hiddenpowergrass', 'move dragondance');
battle.makeChoices('move calmmind', 'move roost');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
it('should suppress user\'s current Flying type if succesful', function () {
@@ -34,7 +34,7 @@ describe('Roost', function () {
battle.setPlayer('p2', {team: [{species: "Aerodactyl", item: 'focussash', ability: 'wonderguard', moves: ['roost', 'doubleedge']}]});
battle.makeChoices('move mudslap', 'move roost');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp); // Immune to Mud Slap
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp); // Immune to Mud Slap
// Ensure that Aerodactyl has some damage
battle.makeChoices('move mudslap', 'move doubleedge');
@@ -67,7 +67,7 @@ describe('Roost', function () {
};
battle.makeChoices('move aircutter, move earthquake', 'move roost, move earthquake');
- assert.strictEqual(hitCount, 3);
+ assert.equal(hitCount, 3);
});
it('should treat a pure Flying pokémon as Normal type', function () {
@@ -76,7 +76,7 @@ describe('Roost', function () {
battle.setPlayer('p2', {team: [{species: "Gastly", item: 'laggingtail', ability: 'levitate', moves: ['astonish']}]});
battle.makeChoices('move roost', 'move astonish');
battle.makeChoices('move roost', 'move astonish');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp); // Immune to Astonish
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp); // Immune to Astonish
});
});
diff --git a/test/sim/moves/round.js b/test/sim/moves/round.js
index e0d05a319b..ed4e6620b2 100644
--- a/test/sim/moves/round.js
+++ b/test/sim/moves/round.js
@@ -16,7 +16,7 @@ describe('Round', function () {
battle.setPlayer('p2', {team: [{species: "Caterpie", level: 2, ability: 'naturalcure', item: 'focussash', moves: ['substitute', 'rest']}]});
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move round', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
});
@@ -33,6 +33,6 @@ describe('Round [Gen 5]', function () {
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move round', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, 'focussash');
+ assert.equal(battle.p2.active[0].item, 'focussash');
});
});
diff --git a/test/sim/moves/shelltrap.js b/test/sim/moves/shelltrap.js
index ea652e064c..297525efc9 100644
--- a/test/sim/moves/shelltrap.js
+++ b/test/sim/moves/shelltrap.js
@@ -24,12 +24,12 @@ describe('Shell Trap', function () {
const move = battle.p1.active[0].getMoveData(Dex.getMove('shelltrap'));
battle.makeChoices('move shelltrap, move splash', 'move irondefense, move splash');
- assert.strictEqual(move.pp, move.maxpp - 1);
+ assert.equal(move.pp, move.maxpp - 1);
const cant = '|cant|p1a: Turtonator|Shell Trap|Shell Trap';
- assert.strictEqual(battle.log.filter(m => m === cant).length, 1);
+ assert.equal(battle.log.filter(m => m === cant).length, 1);
battle.makeChoices('move shelltrap, move splash', 'move tackle, move splash');
- assert.strictEqual(move.pp, move.maxpp - 2);
+ assert.equal(move.pp, move.maxpp - 2);
});
});
diff --git a/test/sim/moves/skydrop.js b/test/sim/moves/skydrop.js
index 3704701a18..5107bccdf1 100644
--- a/test/sim/moves/skydrop.js
+++ b/test/sim/moves/skydrop.js
@@ -15,7 +15,7 @@ describe('Sky Drop', function () {
battle.setPlayer('p1', {team: [{species: "Aerodactyl", ability: 'unnerve', moves: ['skydrop']}]});
battle.setPlayer('p2', {team: [{species: "Lairon", ability: 'sturdy', moves: ['tackle']}]});
battle.makeChoices('move skydrop', 'move tackle');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
battle.makeChoices('move skydrop', 'move tackle');
assert.notStrictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
@@ -29,7 +29,7 @@ describe('Sky Drop', function () {
]});
battle.makeChoices('move skydrop', 'move bulkup');
assert.trapped(() => battle.makeChoices('move skydrop', 'switch aggron'));
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'lairon');
+ assert.equal(battle.p2.active[0].template.speciesid, 'lairon');
});
it('should prevent both the user and the target from being forced out when caught by the effect', function () {
@@ -45,8 +45,8 @@ describe('Sky Drop', function () {
{species: "Omastar", ability: 'swiftswim', moves: ['shellsmash']},
]});
battle.makeChoices('move skydrop 1, move circlethrow 1', 'move bulkup, move dragontail 1');
- assert.strictEqual(battle.p1.active[0].template.speciesid, 'aerodactyl');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'armaldo');
+ assert.equal(battle.p1.active[0].template.speciesid, 'aerodactyl');
+ assert.equal(battle.p2.active[0].template.speciesid, 'armaldo');
});
it('should prevent its target from using Mega Evolution when it is caught by the effect', function () {
@@ -56,7 +56,7 @@ describe('Sky Drop', function () {
]);
battle.makeChoices('move skydrop', 'move charge');
battle.makeChoices('move skydrop', 'move charge mega');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'manectric');
+ assert.equal(battle.p2.active[0].template.speciesid, 'manectric');
});
it('should prevent its target from activating Stance Change when it is caught by the effect', function () {
@@ -64,12 +64,12 @@ describe('Sky Drop', function () {
battle.setPlayer('p1', {team: [{species: "Aerodactyl", ability: 'unnerve', moves: ['skydrop']}]});
battle.setPlayer('p2', {team: [{species: "Aegislash", ability: 'stancechange', moves: ['tackle', 'kingsshield']}]});
battle.makeChoices('move skydrop', 'move tackle');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'aegislash');
+ assert.equal(battle.p2.active[0].template.speciesid, 'aegislash');
battle.makeChoices('move skydrop', 'move tackle');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'aegislashblade');
+ assert.equal(battle.p2.active[0].template.speciesid, 'aegislashblade');
battle.makeChoices('move skydrop', 'move tackle');
battle.makeChoices('move skydrop', 'move kingsshield');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'aegislashblade');
+ assert.equal(battle.p2.active[0].template.speciesid, 'aegislashblade');
});
it('should free its target and allow it to move if the user faints', function () {
@@ -78,8 +78,8 @@ describe('Sky Drop', function () {
[{species: "Lairon", ability: 'sturdy', moves: ['bulkup']}, {species: "Aggron", ability: 'sturdy', moves: ['bulkup']}],
]);
battle.makeChoices('move skydrop 1, move scald -1', 'move bulkup, move bulkup');
- assert.strictEqual(battle.p2.active[0].boosts['atk'], 1);
- assert.strictEqual(battle.p2.active[0].boosts['def'], 1);
+ assert.equal(battle.p2.active[0].boosts['atk'], 1);
+ assert.equal(battle.p2.active[0].boosts['def'], 1);
});
it('should pick up Flying-type Pokemon but do no damage', function () {
@@ -88,9 +88,9 @@ describe('Sky Drop', function () {
[{species: "Salamence", ability: 'intimidate', moves: ['tackle']}],
]);
battle.makeChoices('move skydrop', 'move tackle');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
battle.makeChoices('move skydrop', 'move tackle');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
it('should only make contact on the way down', function () {
@@ -101,9 +101,9 @@ describe('Sky Drop', function () {
{species: "Ferrothorn", ability: 'ironbarbs', moves: ['harden']},
]]);
battle.makeChoices('move Sky Drop', 'move Kings Shield');
- assert.strictEqual(battle.p1.active[0].boosts.atk, 0);
+ assert.equal(battle.p1.active[0].boosts.atk, 0);
battle.makeChoices('move Sky Drop', 'switch Ferrothorn');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
battle.makeChoices('move Sky Drop', 'move Harden');
assert.notStrictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
@@ -131,7 +131,7 @@ describe('Sky Drop', function () {
[{species: "Lairon", ability: 'sturdy', moves: ['bulkup']}, {species: "Aggron", ability: 'sturdy', moves: ['bulkup']}],
]);
battle.makeChoices('move skydrop -2, move spore 1', 'move bulkup, move bulkup');
- assert.strictEqual(battle.p2.active[0].status, 'slp');
+ assert.equal(battle.p2.active[0].status, 'slp');
});
it('should hit its target even if its position changed with Ally Switch', function () {
@@ -141,7 +141,7 @@ describe('Sky Drop', function () {
]);
battle.makeChoices('move skydrop 1, move splash', 'move bulkup, move bulkup');
battle.makeChoices('move skydrop 1, move splash', 'move bulkup, move allyswitch');
- assert.strictEqual(battle.p2.active[1].template.speciesid, 'lairon');
+ assert.equal(battle.p2.active[1].template.speciesid, 'lairon');
assert.notStrictEqual(battle.p2.active[1].hp, battle.p2.active[1].maxhp);
});
@@ -153,7 +153,7 @@ describe('Sky Drop', function () {
battle.makeChoices('move skydrop 1, move splash', 'move bulkup, move bulkup');
battle.makeChoices('move skydrop 1, move splash', 'move bulkup, move followme');
assert.notStrictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
- assert.strictEqual(battle.p2.active[1].hp, battle.p2.active[1].maxhp);
+ assert.equal(battle.p2.active[1].hp, battle.p2.active[1].maxhp);
});
it('should cause most moves aimed at the user or target to miss', function () {
@@ -168,8 +168,8 @@ describe('Sky Drop', function () {
battle.makeChoices('move skydrop 1, move aquajet 2', 'move bulkup, move aquajet 2');
// Aerodactyl and Lairon are now airborne from Sky Drop
battle.makeChoices('move skydrop 1, move aquajet 1', 'move bulkup, move aquajet 1');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
it('should be cancelled by Gravity and allow the target to use its move', function () {
@@ -178,8 +178,8 @@ describe('Sky Drop', function () {
[{species: "Lairon", ability: 'sturdy', moves: ['bulkup']}, {species: "Aggron", ability: 'sturdy', moves: ['bulkup']}],
]);
battle.makeChoices('move skydrop 1, move gravity', 'move bulkup, move bulkup');
- assert.strictEqual(battle.p2.active[0].boosts['atk'], 1);
- assert.strictEqual(battle.p2.active[0].boosts['def'], 1);
+ assert.equal(battle.p2.active[0].boosts['atk'], 1);
+ assert.equal(battle.p2.active[0].boosts['def'], 1);
});
});
@@ -194,7 +194,7 @@ describe('Sky Drop [Gen 5]', function () {
[{species: "Aggron", ability: 'sturdy', moves: ['tackle']}],
]);
battle.makeChoices('move skydrop', 'move tackle');
- assert.strictEqual(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
+ assert.equal(battle.p1.active[0].hp, battle.p1.active[0].maxhp);
});
describe.skip('Sky Drop Glitch', function () {
@@ -217,14 +217,14 @@ describe('Sky Drop [Gen 5]', function () {
it('should prevent the target from moving or switching', function () {
battle.makeChoices('move rockpolish, move recover', 'move tackle 2, move nastyplot');
- assert.strictEqual(battle.p1.active[1].hp, battle.p1.active[1].maxhp);
+ assert.equal(battle.p1.active[1].hp, battle.p1.active[1].maxhp);
battle.makeChoices('move rockpolish, move recover', 'switch azurill, move nastyplot');
- assert.strictEqual(battle.p2.active[0].template.speciesid, 'magikarp');
+ assert.equal(battle.p2.active[0].template.speciesid, 'magikarp');
});
it('should prevent the user from being forced out', function () {
battle.makeChoices('move rockpolish, move recover', 'move sleeptalk, move roar 1');
- assert.strictEqual(battle.p1.active[0].template.speciesid, 'aerodactyl');
+ assert.equal(battle.p1.active[0].template.speciesid, 'aerodactyl');
});
it('should end when the user switches out', function () {
diff --git a/test/sim/moves/snarl.js b/test/sim/moves/snarl.js
index f8a8063992..b974209941 100644
--- a/test/sim/moves/snarl.js
+++ b/test/sim/moves/snarl.js
@@ -18,7 +18,7 @@ describe('Snarl', function () {
battle.makeChoices('move Splash', 'move Substitute');
battle.makeChoices('move Snarl', 'move Rest');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
});
@@ -36,6 +36,6 @@ describe('Snarl [Gen 5]', function () {
battle.makeChoices('move Splash', 'move Substitute');
battle.makeChoices('move Snarl', 'move Rest');
- assert.strictEqual(battle.p2.active[0].item, 'focussash');
+ assert.equal(battle.p2.active[0].item, 'focussash');
});
});
diff --git a/test/sim/moves/stealthrock.js b/test/sim/moves/stealthrock.js
index 042fff64f9..e3b2e53846 100644
--- a/test/sim/moves/stealthrock.js
+++ b/test/sim/moves/stealthrock.js
@@ -36,7 +36,7 @@ describe('Stealth Rock', function () {
pokemon = battle.p2.active[0];
const expectedPercent = Math.pow(0.5, i - 1);
const expectedDamage = Math.floor(pokemon.maxhp * expectedPercent);
- assert.strictEqual(pokemon.maxhp - pokemon.hp, expectedDamage, `${pokemon.name} should take ${expectedPercent * 100}%`);
+ assert.equal(pokemon.maxhp - pokemon.hp, expectedDamage, `${pokemon.name} should take ${expectedPercent * 100}%`);
}
});
});
diff --git a/test/sim/moves/stockpile.js b/test/sim/moves/stockpile.js
index 27ca5fb8d4..300a869f61 100644
--- a/test/sim/moves/stockpile.js
+++ b/test/sim/moves/stockpile.js
@@ -21,7 +21,7 @@ describe('Stockpile', function () {
battle.makeChoices('move stockpile', 'move sleeptalk');
battle.makeChoices('move spitup', 'move sleeptalk');
- assert.strictEqual(battle.p1.active[0].boosts.def, 4);
- assert.strictEqual(battle.p1.active[0].boosts.spd, 5);
+ assert.equal(battle.p1.active[0].boosts.def, 4);
+ assert.equal(battle.p1.active[0].boosts.spd, 5);
});
});
diff --git a/test/sim/moves/stompingtantrum.js b/test/sim/moves/stompingtantrum.js
index 7537f3168b..0e9d886786 100644
--- a/test/sim/moves/stompingtantrum.js
+++ b/test/sim/moves/stompingtantrum.js
@@ -17,7 +17,7 @@ describe('Stomping Tantrum', function () {
]);
battle.onEvent('BasePower', battle.format, function (basePower) {
- assert.strictEqual(basePower, 150);
+ assert.equal(basePower, 150);
});
battle.makeChoices('move attract', 'move rest');
@@ -33,7 +33,7 @@ describe('Stomping Tantrum', function () {
]);
battle.onEvent('BasePower', battle.format, function (basePower) {
- assert.strictEqual(basePower, 75);
+ assert.equal(basePower, 75);
});
battle.makeChoices('move stompingtantrum', 'move protect');
@@ -52,7 +52,7 @@ describe('Stomping Tantrum', function () {
]});
battle.onEvent('BasePower', battle.format, function (basePower, attacker, defender, move) {
- if (move.id === 'stompingtantrum') assert.strictEqual(basePower, 150);
+ if (move.id === 'stompingtantrum') assert.equal(basePower, 150);
});
battle.makeChoices('move sunnyday, move precipiceblades', 'move protect, move recover');
@@ -66,7 +66,7 @@ describe('Stomping Tantrum', function () {
]);
battle.onEvent('BasePower', battle.format, function (basePower) {
- assert.strictEqual(basePower, 75);
+ assert.equal(basePower, 75);
});
battle.makeChoices('move celebrate', 'move rest');
@@ -80,7 +80,7 @@ describe('Stomping Tantrum', function () {
]);
battle.onEvent('BasePower', battle.format, function (basePower, pokemon, target, move) {
- if (move.id === 'stompingtantrum') assert.strictEqual(basePower, 75);
+ if (move.id === 'stompingtantrum') assert.equal(basePower, 75);
});
battle.makeChoices('move hyperbeam', 'move sleeptalk');
diff --git a/test/sim/moves/substitute.js b/test/sim/moves/substitute.js
index 756b91b0f8..592e5d0a2a 100644
--- a/test/sim/moves/substitute.js
+++ b/test/sim/moves/substitute.js
@@ -16,7 +16,7 @@ describe('Substitute', function () {
battle.setPlayer('p2', {team: [{species: 'Mewtwo', ability: 'pressure', moves: ['recover']}]});
battle.makeChoices('move substitute', 'move recover');
let pokemon = battle.p1.active[0];
- assert.strictEqual(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
+ assert.equal(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
});
it('should not block the user\'s own moves from targetting itself', function () {
@@ -25,8 +25,8 @@ describe('Substitute', function () {
battle.setPlayer('p2', {team: [{species: 'Mewtwo', ability: 'pressure', moves: ['recover']}]});
battle.makeChoices('move substitute', 'move recover');
battle.makeChoices('move calmmind', 'move recover');
- assert.strictEqual(battle.p1.active[0].boosts['spa'], 1);
- assert.strictEqual(battle.p1.active[0].boosts['spd'], 1);
+ assert.equal(battle.p1.active[0].boosts['spa'], 1);
+ assert.equal(battle.p1.active[0].boosts['spd'], 1);
});
it('should block damage from most moves', function () {
@@ -35,7 +35,7 @@ describe('Substitute', function () {
battle.setPlayer('p2', {team: [{species: 'Mewtwo', ability: 'pressure', item: 'laggingtail', moves: ['psystrike']}]});
battle.makeChoices('move substitute', 'move psystrike');
let pokemon = battle.p1.active[0];
- assert.strictEqual(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
+ assert.equal(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
});
it('should not block recoil damage', function () {
@@ -55,18 +55,18 @@ describe('Substitute', function () {
battle.makeChoices('move substitute', 'move substitute');
let subhp = battle.p1.active[0].volatiles['substitute'].hp;
- assert.strictEqual(subhp, battle.p2.active[0].volatiles['substitute'].hp);
+ assert.equal(subhp, battle.p2.active[0].volatiles['substitute'].hp);
battle.resetRNG(); // Make Hi Jump Kick miss and cause recoil.
battle.makeChoices('move highjumpkick', 'move agility');
// Both Pokemon had a substitute, so the *target* Substitute takes recoil damage.
let pokemon = battle.p1.active[0];
- assert.strictEqual(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
- assert.strictEqual(pokemon.volatiles['substitute'].hp, subhp);
+ assert.equal(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
+ assert.equal(pokemon.volatiles['substitute'].hp, subhp);
pokemon = battle.p2.active[0];
- assert.strictEqual(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
- assert.strictEqual(pokemon.volatiles['substitute'].hp, subhp - 1);
+ assert.equal(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
+ assert.equal(pokemon.volatiles['substitute'].hp, subhp - 1);
// Hi Jump Kick hits and breaks the Substitite.
battle.makeChoices('move highjumpkick', 'move agility');
@@ -75,10 +75,10 @@ describe('Substitute', function () {
// Only P1 has a substitute, so no one takes recoil damage.
pokemon = battle.p1.active[0];
- assert.strictEqual(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
- assert.strictEqual(pokemon.volatiles['substitute'].hp, subhp);
+ assert.equal(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
+ assert.equal(pokemon.volatiles['substitute'].hp, subhp);
pokemon = battle.p2.active[0];
- assert.strictEqual(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
+ assert.equal(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
});
it('should cause recoil damage from an opponent\'s moves to be based on damage dealt to the substitute', function () {
@@ -88,7 +88,7 @@ describe('Substitute', function () {
battle.makeChoices('move substitute', 'move nastyplot');
battle.makeChoices('move substitute', 'move lightofruin');
let pokemon = battle.p2.active[0];
- assert.strictEqual(pokemon.maxhp - pokemon.hp, Math.ceil(Math.floor(battle.p1.active[0].maxhp / 4) / 2));
+ assert.equal(pokemon.maxhp - pokemon.hp, Math.ceil(Math.floor(battle.p1.active[0].maxhp / 4) / 2));
});
it('should cause recovery from an opponent\'s draining moves to be based on damage dealt to the substitute', function () {
@@ -98,7 +98,7 @@ describe('Substitute', function () {
battle.makeChoices('move substitute', 'move bellydrum');
let hp = battle.p2.active[0].hp;
battle.makeChoices('move substitute', 'move drainpunch');
- assert.strictEqual(battle.p2.active[0].hp - hp, Math.ceil(Math.floor(battle.p1.active[0].maxhp / 4) / 2));
+ assert.equal(battle.p2.active[0].hp - hp, Math.ceil(Math.floor(battle.p1.active[0].maxhp / 4) / 2));
});
it('should block most status moves targetting the user', function () {
@@ -107,7 +107,7 @@ describe('Substitute', function () {
battle.setPlayer('p2', {team: [{species: 'Mewtwo', ability: 'pressure', item: 'laggingtail', moves: ['hypnosis', 'toxic', 'poisongas', 'thunderwave', 'willowisp']}]});
for (let i = 1; i <= 5; i++) {
battle.makeChoices('move substitute', 'move ' + i);
- assert.strictEqual(battle.p1.active[0].status, '');
+ assert.equal(battle.p1.active[0].status, '');
}
});
@@ -128,7 +128,7 @@ describe('Substitute', function () {
const pokemon = battle.p1.active[0];
battle.makeChoices('move substitute', 'move clamp');
- assert.strictEqual(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
+ assert.equal(pokemon.maxhp - pokemon.hp, Math.floor(pokemon.maxhp / 4));
const hp = pokemon.hp;
battle.makeChoices('move growl', 'move clamp');
diff --git a/test/sim/moves/taunt.js b/test/sim/moves/taunt.js
index f95e80a060..cd49846e4e 100644
--- a/test/sim/moves/taunt.js
+++ b/test/sim/moves/taunt.js
@@ -15,8 +15,8 @@ describe('Taunt', function () {
battle.setPlayer('p1', {team: [{species: 'Sableye', ability: 'prankster', moves: ['taunt']}]});
battle.setPlayer('p2', {team: [{species: 'Chansey', ability: 'naturalcure', moves: ['calmmind']}]});
battle.makeChoices('move taunt', 'move calmmind');
- assert.strictEqual(battle.p2.active[0].boosts['spa'], 0);
- assert.strictEqual(battle.p2.active[0].boosts['spd'], 0);
+ assert.equal(battle.p2.active[0].boosts['spa'], 0);
+ assert.equal(battle.p2.active[0].boosts['spd'], 0);
battle.makeChoices('move taunt', 'move struggle');
});
diff --git a/test/sim/moves/thief.js b/test/sim/moves/thief.js
index 23ddec53ae..3581f89f36 100644
--- a/test/sim/moves/thief.js
+++ b/test/sim/moves/thief.js
@@ -15,7 +15,7 @@ describe('Thief', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', moves: ['thief']}]});
battle.setPlayer('p2', {team: [{species: "Blissey", ability: 'naturalcure', item: 'shedshell', moves: ['softboiled']}]});
battle.makeChoices('move thief', 'move softboiled');
- assert.strictEqual(battle.p1.active[0].item, 'shedshell');
+ assert.equal(battle.p1.active[0].item, 'shedshell');
});
it('should not steal items if it is holding an item', function () {
@@ -23,7 +23,7 @@ describe('Thief', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', item: 'focussash', moves: ['thief']}]});
battle.setPlayer('p2', {team: [{species: "Blissey", ability: 'naturalcure', item: 'shedshell', moves: ['softboiled']}]});
battle.makeChoices('move thief', 'move softboiled');
- assert.strictEqual(battle.p2.active[0].item, 'shedshell');
+ assert.equal(battle.p2.active[0].item, 'shedshell');
});
it('should take Life Orb damage from a stolen Life Orb', function () {
@@ -31,6 +31,6 @@ describe('Thief', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', moves: ['thief']}]});
battle.setPlayer('p2', {team: [{species: "Blissey", ability: 'naturalcure', item: 'lifeorb', moves: ['softboiled']}]});
battle.makeChoices('move thief', 'move softboiled');
- assert.strictEqual(battle.p1.active[0].hp, Math.ceil(9 / 10 * battle.p1.active[0].maxhp));
+ assert.equal(battle.p1.active[0].hp, Math.ceil(9 / 10 * battle.p1.active[0].maxhp));
});
});
diff --git a/test/sim/moves/thousandarrows.js b/test/sim/moves/thousandarrows.js
index c5153b9b5c..2bc246434a 100644
--- a/test/sim/moves/thousandarrows.js
+++ b/test/sim/moves/thousandarrows.js
@@ -25,11 +25,11 @@ describe('Thousand Arrows', function () {
battle.setPlayer('p1', {team: [{species: "Zygarde", ability: 'aurabreak', item: 'laggingtail', moves: ['thousandarrows']}]});
battle.setPlayer('p2', {team: [{species: "Ho-Oh", ability: 'shellarmor', item: 'weaknesspolicy', moves: ['recover']}]});
battle.makeChoices('move thousandarrows', 'move recover');
- assert.strictEqual(battle.p2.active[0].boosts.atk, 0);
- assert.strictEqual(battle.p2.active[0].boosts.spa, 0);
+ assert.equal(battle.p2.active[0].boosts.atk, 0);
+ assert.equal(battle.p2.active[0].boosts.spa, 0);
battle.makeChoices('move thousandarrows', 'move recover');
- assert.strictEqual(battle.p2.active[0].boosts.atk, 2);
- assert.strictEqual(battle.p2.active[0].boosts.spa, 2);
+ assert.equal(battle.p2.active[0].boosts.atk, 2);
+ assert.equal(battle.p2.active[0].boosts.spa, 2);
});
it('should not ignore type effectiveness on the first hit against Flying-type Pokemon with Ring Target', function () {
@@ -49,7 +49,7 @@ describe('Thousand Arrows', function () {
let hp = battle.p2.active[0].hp;
assert.notStrictEqual(hp, battle.p2.active[0].maxhp);
battle.makeChoices('move mudslap', 'move trick');
- assert.strictEqual(hp, battle.p2.active[0].hp);
+ assert.equal(hp, battle.p2.active[0].hp);
});
it('should not ground or deal neutral damage to Flying-type Pokemon affected by Gravity', function () {
@@ -83,8 +83,8 @@ describe('Thousand Arrows', function () {
battle.setPlayer('p1', {team: [{species: "Zygarde", ability: 'aurabreak', moves: ['thousandarrows', 'earthquake']}]});
battle.setPlayer('p2', {team: [{species: "Eelektross", ability: 'levitate', item: 'weaknesspolicy', moves: ['thunderwave']}]});
battle.makeChoices('move thousandarrows', 'move thunderwave');
- assert.strictEqual(battle.p2.active[0].boosts.atk, 2);
- assert.strictEqual(battle.p2.active[0].boosts.spa, 2);
+ assert.equal(battle.p2.active[0].boosts.atk, 2);
+ assert.equal(battle.p2.active[0].boosts.spa, 2);
});
it('should hit Pokemon with Air Balloon', function () {
@@ -102,7 +102,7 @@ describe('Thousand Arrows', function () {
battle.setPlayer('p1', {team: [{species: "Zygarde", ability: 'aurabreak', item: 'laggingtail', moves: ['thousandarrows', 'earthquake']}]});
battle.setPlayer('p2', {team: [{species: "Stunfisk", ability: 'limber', moves: ['electrify']}]});
battle.makeChoices('move thousandarrows', 'move electrify');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
it('should not hit Ghost-type Pokemon when affected by Normalize', function () {
@@ -110,6 +110,6 @@ describe('Thousand Arrows', function () {
battle.setPlayer('p1', {team: [{species: "Zygarde", ability: 'normalize', item: 'laggingtail', moves: ['thousandarrows', 'earthquake']}]});
battle.setPlayer('p2', {team: [{species: "Dusknoir", ability: 'pressure', moves: ['haze']}]});
battle.makeChoices('move thousandarrows', 'move haze');
- assert.strictEqual(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
+ assert.equal(battle.p2.active[0].hp, battle.p2.active[0].maxhp);
});
});
diff --git a/test/sim/moves/thunderwave.js b/test/sim/moves/thunderwave.js
index b701cdc81e..2efe8d5076 100644
--- a/test/sim/moves/thunderwave.js
+++ b/test/sim/moves/thunderwave.js
@@ -15,7 +15,7 @@ describe('Thunder Wave', function () {
battle.setPlayer('p1', {team: [{species: "Jolteon", ability: 'quickfeet', moves: ['thunderwave']}]});
battle.setPlayer('p2', {team: [{species: "Vaporeon", ability: 'hydration', moves: ['aquaring']}]});
battle.makeChoices('move thunderwave', 'move aquaring');
- assert.strictEqual(battle.p2.active[0].status, 'par');
+ assert.equal(battle.p2.active[0].status, 'par');
});
it('should not ignore natural type immunities', function () {
@@ -23,6 +23,6 @@ describe('Thunder Wave', function () {
battle.setPlayer('p1', {team: [{species: "Jolteon", ability: 'quickfeet', moves: ['thunderwave']}]});
battle.setPlayer('p2', {team: [{species: "Hippowdon", ability: 'sandforce', moves: ['slackoff']}]});
battle.makeChoices('move thunderwave', 'move slackoff');
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
});
});
diff --git a/test/sim/moves/transform.js b/test/sim/moves/transform.js
index 34701c098e..4ca3c85860 100644
--- a/test/sim/moves/transform.js
+++ b/test/sim/moves/transform.js
@@ -15,7 +15,7 @@ describe('Transform', function () {
battle.setPlayer('p1', {team: [{species: "Ditto", ability: 'limber', moves: ['transform']}]});
battle.setPlayer('p2', {team: [{species: "Hoopa-Unbound", ability: 'magician', moves: ['rest']}]});
battle.makeChoices('move transform', 'move rest');
- assert.strictEqual(battle.p1.active[0].template, battle.p2.active[0].template);
+ assert.equal(battle.p1.active[0].template, battle.p2.active[0].template);
});
it('should copy all stats except HP', function () {
@@ -26,7 +26,7 @@ describe('Transform', function () {
let p1poke = battle.p1.active[0];
let p2poke = battle.p2.active[0];
for (let stat in p1poke.stats) {
- assert.strictEqual(p1poke.stats[stat], p2poke.stats[stat]);
+ assert.equal(p1poke.stats[stat], p2poke.stats[stat]);
}
assert.notStrictEqual(p1poke.hp, p2poke.hp);
assert.notStrictEqual(p1poke.maxhp, p2poke.maxhp);
@@ -42,7 +42,7 @@ describe('Transform', function () {
let p1poke = battle.p1.active[0];
let p2poke = battle.p2.active[0];
for (let stat in p1poke.boosts) {
- assert.strictEqual(p1poke.boosts[stat], p2poke.boosts[stat]);
+ assert.equal(p1poke.boosts[stat], p2poke.boosts[stat]);
}
});
@@ -61,13 +61,13 @@ describe('Transform', function () {
let p1poke = battle.p1.active[0];
let p2poke = battle.p2.active[0];
battle.makeChoices('move transform', 'move rest');
- assert.strictEqual(p1poke.moves.length, p2poke.moves.length);
+ assert.equal(p1poke.moves.length, p2poke.moves.length);
for (let i = 0; i < p1poke.moves.length; i++) {
let move = p1poke.moves[i];
- assert.strictEqual(move, p2poke.moves[i]);
+ assert.equal(move, p2poke.moves[i]);
move = battle.dex.getMove(move);
let movepp = p1poke.getMoveData(move);
- assert.strictEqual(movepp.pp, 5);
+ assert.equal(movepp.pp, 5);
}
});
@@ -76,7 +76,7 @@ describe('Transform', function () {
battle.setPlayer('p1', {team: [{species: "Ditto", ability: 'limber', moves: ['transform']}]});
battle.setPlayer('p2', {team: [{species: "Arcanine", ability: 'intimidate', moves: ['rest']}]});
battle.makeChoices('move transform', 'move rest');
- assert.strictEqual(battle.p2.active[0].boosts['atk'], -1);
+ assert.equal(battle.p2.active[0].boosts['atk'], -1);
});
it('should not copy speed boosts from Unburden', function () {
@@ -114,7 +114,7 @@ describe('Transform', function () {
{species: "Mew", ability: 'synchronize', moves: ['transform']},
]});
battle.makeChoices('move transform', 'move splash');
- assert.strictEqual(battle.p1.active[0].template, battle.p2.active[0].template);
+ assert.equal(battle.p1.active[0].template, battle.p2.active[0].template);
battle.makeChoices('move splash', 'switch 2');
battle.makeChoices('move splash', 'move transform');
assert.notStrictEqual(battle.p1.active[0].template, battle.p2.active[0].template);
@@ -126,7 +126,7 @@ describe('Transform', function () {
[{species: "Arceus-Steel", ability: 'multitype', item: 'ironplate', moves: ['rest']}],
]);
battle.makeChoices('move transform', 'move rest');
- assert.deepStrictEqual(battle.p1.active[0].getTypes(), ["Steel"]);
+ assert.deepEqual(battle.p1.active[0].getTypes(), ["Steel"]);
});
it(`should ignore the effects of Roost`, function () {
@@ -136,7 +136,7 @@ describe('Transform', function () {
]);
battle.makeChoices('move seismictoss', 'move roost');
battle.makeChoices('move transform', 'move roost');
- assert.deepStrictEqual(battle.p1.active[0].getTypes(), ["Fire", "Flying"]);
+ assert.deepEqual(battle.p1.active[0].getTypes(), ["Fire", "Flying"]);
});
});
@@ -164,7 +164,7 @@ describe('Transform [Gen 4]', function () {
[{species: "Giratina-Origin", ability: 'levitate', item: 'griseousorb', moves: ['rest']}],
]);
battle.makeChoices('move transform', 'move rest');
- assert.strictEqual(battle.p1.active[0].template.species, 'Giratina');
+ assert.equal(battle.p1.active[0].template.species, 'Giratina');
});
it('should cause Pokemon transformed into Giratina-Alternate to become Giratina-Origin if holding a Griseous Orb', function () {
@@ -173,7 +173,7 @@ describe('Transform [Gen 4]', function () {
[{species: "Giratina", ability: 'pressure', moves: ['rest']}],
]);
battle.makeChoices('move transform', 'move rest');
- assert.strictEqual(battle.p1.active[0].template.species, 'Giratina-Origin');
+ assert.equal(battle.p1.active[0].template.species, 'Giratina-Origin');
});
it('should cause Pokemon transformed into Arceus to become an Arceus forme corresponding to its held Plate', function () {
@@ -182,8 +182,8 @@ describe('Transform [Gen 4]', function () {
[{species: "Arceus-Steel", ability: 'multitype', item: 'ironplate', moves: ['rest']}],
]);
battle.makeChoices('move transform', 'move rest');
- assert.strictEqual(battle.p1.active[0].template.species, 'Arceus-Fire');
- assert.deepStrictEqual(battle.p1.active[0].getTypes(), ["Fire"]);
+ assert.equal(battle.p1.active[0].template.species, 'Arceus-Fire');
+ assert.deepEqual(battle.p1.active[0].getTypes(), ["Fire"]);
});
it('should succeed against a Substitute', function () {
@@ -192,7 +192,7 @@ describe('Transform [Gen 4]', function () {
[{species: "Mewtwo", ability: 'pressure', moves: ['substitute']}],
]);
battle.makeChoices('move transform', 'move substitute');
- assert.strictEqual(battle.p1.active[0].template, battle.p2.active[0].template);
+ assert.equal(battle.p1.active[0].template, battle.p2.active[0].template);
});
});
diff --git a/test/sim/moves/trick.js b/test/sim/moves/trick.js
index 9f91a5a81c..a7df6bd5f9 100644
--- a/test/sim/moves/trick.js
+++ b/test/sim/moves/trick.js
@@ -13,8 +13,8 @@ describe('Trick', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', item: 'leftovers', moves: ['trick']}]});
battle.setPlayer('p2', {team: [{species: "Purugly", ability: 'defiant', item: 'sitrusberry', moves: ['rest']}]});
battle.makeChoices('move trick', 'move rest');
- assert.strictEqual(battle.p1.active[0].item, 'sitrusberry');
- assert.strictEqual(battle.p2.active[0].item, 'leftovers');
+ assert.equal(battle.p1.active[0].item, 'sitrusberry');
+ assert.equal(battle.p2.active[0].item, 'leftovers');
});
it('should not take plates from Arceus', function () {
@@ -22,7 +22,7 @@ describe('Trick', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', moves: ['trick']}]});
battle.setPlayer('p2', {team: [{species: "Arceus", ability: 'download', item: 'flameplate', moves: ['swordsdance']}]});
battle.makeChoices('move trick', 'move swordsdance');
- assert.strictEqual(battle.p2.active[0].item, 'flameplate');
+ assert.equal(battle.p2.active[0].item, 'flameplate');
});
it('should not cause Arceus to gain a plate', function () {
@@ -30,7 +30,7 @@ describe('Trick', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', item: 'fistplate', moves: ['trick']}]});
battle.setPlayer('p2', {team: [{species: "Arceus", ability: 'download', moves: ['swordsdance']}]});
battle.makeChoices('move trick', 'move swordsdance');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
it('should not remove drives from Genesect', function () {
@@ -38,7 +38,7 @@ describe('Trick', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', moves: ['trick']}]});
battle.setPlayer('p2', {team: [{species: "Genesect", ability: 'download', item: 'dousedrive', moves: ['shiftgear']}]});
battle.makeChoices('move trick', 'move shiftgear');
- assert.strictEqual(battle.p2.active[0].item, 'dousedrive');
+ assert.equal(battle.p2.active[0].item, 'dousedrive');
});
it('should not cause Genesect to gain a drive', function () {
@@ -46,7 +46,7 @@ describe('Trick', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', item: 'shockdrive', moves: ['trick']}]});
battle.setPlayer('p2', {team: [{species: "Genesect", ability: 'download', moves: ['shiftgear']}]});
battle.makeChoices('move trick', 'move shiftgear');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
it('should not remove correctly held mega stones', function () {
@@ -54,7 +54,7 @@ describe('Trick', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', moves: ['trick']}]});
battle.setPlayer('p2', {team: [{species: "Scizor", ability: 'technician', item: 'scizorite', moves: ['swordsdance']}]});
battle.makeChoices('move trick', 'move swordsdance');
- assert.strictEqual(battle.p2.active[0].item, 'scizorite');
+ assert.equal(battle.p2.active[0].item, 'scizorite');
});
it('should remove wrong mega stones', function () {
@@ -62,7 +62,7 @@ describe('Trick', function () {
battle.setPlayer('p1', {team: [{species: "Mew", ability: 'synchronize', moves: ['trick']}]});
battle.setPlayer('p2', {team: [{species: "Scizor", ability: 'technician', item: 'audinite', moves: ['swordsdance']}]});
battle.makeChoices('move trick', 'move swordsdance');
- assert.strictEqual(battle.p1.active[0].item, 'audinite');
+ assert.equal(battle.p1.active[0].item, 'audinite');
});
});
@@ -76,7 +76,7 @@ describe('Z-Trick', function () {
const [user, nonTarget] = [battle.p1.active[0], battle.p2.active[0]];
battle.makeChoices('move trick zmove', 'move quickattack');
assert.statStage(user, 'spe', 2);
- assert.strictEqual(user.item, 'psychiumz');
- assert.strictEqual(nonTarget.item, 'leftovers');
+ assert.equal(user.item, 'psychiumz');
+ assert.equal(nonTarget.item, 'leftovers');
});
});
diff --git a/test/sim/moves/trickroom.js b/test/sim/moves/trickroom.js
index f8c90257cc..dd4c0500b2 100644
--- a/test/sim/moves/trickroom.js
+++ b/test/sim/moves/trickroom.js
@@ -17,8 +17,8 @@ describe('Trick Room', function () {
]);
battle.makeChoices('move trickroom', 'move poisonjab');
battle.makeChoices('move spore', 'move spore');
- assert.strictEqual(battle.p1.active[0].status, '');
- assert.strictEqual(battle.p2.active[0].status, 'slp');
+ assert.equal(battle.p1.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, 'slp');
});
it('should not allow Pokemon using a lower priority move to act before other Pokemon', function () {
@@ -28,8 +28,8 @@ describe('Trick Room', function () {
]);
battle.makeChoices('move trickroom', 'move poisonjab');
battle.makeChoices('move spore', 'move protect');
- assert.strictEqual(battle.p1.active[0].status, '');
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p1.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
});
it('should also affect the activation order for abilities and other non-move actions', function () {
@@ -45,9 +45,9 @@ describe('Trick Room', function () {
battle.makeChoices('move trickroom', 'move shellsmash');
battle.makeChoices('move explosion', 'move shellsmash');
battle.makeChoices('switch hippowdon', 'switch ninetales');
- assert.strictEqual(battle.p1.active[0].speciesid, 'hippowdon');
- assert.strictEqual(battle.p2.active[0].speciesid, 'ninetales');
- assert.strictEqual(battle.field.effectiveWeather(), 'sunnyday');
+ assert.equal(battle.p1.active[0].speciesid, 'hippowdon');
+ assert.equal(battle.p2.active[0].speciesid, 'ninetales');
+ assert.equal(battle.field.effectiveWeather(), 'sunnyday');
});
// The following two tests involve the Trick Room glitch, where turn order changes when a Pokemon goes to 1809 speed.
@@ -66,13 +66,13 @@ describe('Trick Room', function () {
battle.p2.active[0].boostBy({spe: 6});
battle.makeChoices('move spore', 'move spore');
- assert.strictEqual(battle.p1.active[0].status, '');
- assert.strictEqual(battle.p2.active[0].status, 'slp');
+ assert.equal(battle.p1.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, 'slp');
battle.p2.active[0].setStatus('');
battle.p2.active[0].setItem('choicescarf'); // Deoxys is now much faster speed-wise than Ninjask, but should still be slower in Trick Room.
battle.makeChoices('move spore', 'move spore');
- assert.strictEqual(battle.p1.active[0].status, '');
- assert.strictEqual(battle.p2.active[0].status, 'slp');
+ assert.equal(battle.p1.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, 'slp');
});
it('should not affect damage dealt by moves whose power is reliant on speed', function () {
@@ -87,7 +87,7 @@ describe('Trick Room', function () {
battle.onEvent('BasePower', battle.format, function (bp, pokemon, target, move) {
if (move.id !== 'gyroball') return;
- assert.strictEqual(bp, 26); // BP should theoretically be this based on speed values
+ assert.equal(bp, 26); // BP should theoretically be this based on speed values
});
battle.makeChoices('move earthquake', 'move gyroball');
diff --git a/test/sim/moves/trumpcard.js b/test/sim/moves/trumpcard.js
index 83ca15f54b..1b1663274d 100644
--- a/test/sim/moves/trumpcard.js
+++ b/test/sim/moves/trumpcard.js
@@ -27,7 +27,7 @@ describe('Trump Card', function () {
battle.makeChoices();
}
- assert.deepStrictEqual(basePowers, [40, 50, 60, 80, 200]);
+ assert.deepEqual(basePowers, [40, 50, 60, 80, 200]);
});
it('should get its base power calculated from a move calling it', function () {
@@ -49,7 +49,7 @@ describe('Trump Card', function () {
battle.makeChoices();
}
- assert.deepStrictEqual(basePowers, [80, 200]);
+ assert.deepEqual(basePowers, [80, 200]);
});
it('should work if called via Custap Berry in Gen 4', function () {
@@ -68,6 +68,6 @@ describe('Trump Card', function () {
battle.makeChoices();
battle.makeChoices();
- assert.deepStrictEqual(basePowers, [40, 50]);
+ assert.deepEqual(basePowers, [40, 50]);
});
});
diff --git a/test/sim/moves/u-turn.js b/test/sim/moves/u-turn.js
index 873ab4c8ef..6789320036 100644
--- a/test/sim/moves/u-turn.js
+++ b/test/sim/moves/u-turn.js
@@ -19,6 +19,6 @@ describe('U-Turn', function () {
]]);
battle.makeChoices('move uturn', 'move substitute');
- assert.strictEqual(battle.requestState, 'switch');
+ assert.equal(battle.requestState, 'switch');
});
});
diff --git a/test/sim/moves/uproar.js b/test/sim/moves/uproar.js
index 62d565b26b..7a04d31cef 100644
--- a/test/sim/moves/uproar.js
+++ b/test/sim/moves/uproar.js
@@ -16,7 +16,7 @@ describe('Uproar', function () {
battle.setPlayer('p2', {team: [{species: "Caterpie", level: 2, ability: 'naturalcure', item: 'focussash', moves: ['substitute', 'rest']}]});
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move uproar', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
});
@@ -32,6 +32,6 @@ describe('Uproar [Gen 5]', function () {
]);
battle.makeChoices('move splash', 'move substitute');
battle.makeChoices('move uproar', 'move rest');
- assert.strictEqual(battle.p2.active[0].item, 'focussash');
+ assert.equal(battle.p2.active[0].item, 'focussash');
});
});
diff --git a/test/sim/moves/weatherball.js b/test/sim/moves/weatherball.js
index 0a2be7abca..e8a83d9b96 100644
--- a/test/sim/moves/weatherball.js
+++ b/test/sim/moves/weatherball.js
@@ -19,7 +19,7 @@ describe('Weather Ball', function () {
{species: "Gastly", level: 2, ability: 'drought', item: 'focussash', moves: ['splash']},
]});
battle.makeChoices('move weatherball zmove', 'move splash');
- assert.strictEqual(battle.p2.active[0].item, '');
+ assert.equal(battle.p2.active[0].item, '');
});
it('should not change type when called by a Z-move in weather', function () {
diff --git a/test/sim/moves/wish.js b/test/sim/moves/wish.js
index 5c7c70205c..9cbc798952 100644
--- a/test/sim/moves/wish.js
+++ b/test/sim/moves/wish.js
@@ -25,7 +25,7 @@ describe('Wish', function () {
battle.makeChoices('move wish, move wish', 'move icebeam 1, move moonblast 2');
battle.makeChoices('switch 3, switch 4', 'move icebeam 1, move moonblast 2');
assert.fullHP(battle.p1.active[0]);
- assert.strictEqual(battle.p1.active[1].hp, 321);
+ assert.equal(battle.p1.active[1].hp, 321);
});
it('should progress its duration whether or not the Pokemon in its slot is fainted', function () {
diff --git a/test/sim/moves/yawn.js b/test/sim/moves/yawn.js
index c120f66911..437f8231fc 100644
--- a/test/sim/moves/yawn.js
+++ b/test/sim/moves/yawn.js
@@ -17,9 +17,9 @@ describe('Yawn', function () {
{species: "Ninjask", moves: ['splash']},
]]);
battle.makeChoices();
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
battle.makeChoices('move 2', 'move 1');
- assert.strictEqual(battle.p2.active[0].status, 'slp');
+ assert.equal(battle.p2.active[0].status, 'slp');
});
it(`should be blocked by Safeguard`, function () {
@@ -30,7 +30,7 @@ describe('Yawn', function () {
]]);
battle.makeChoices();
battle.makeChoices();
- assert.strictEqual(battle.p2.active[0].status, '');
+ assert.equal(battle.p2.active[0].status, '');
});
it(`should be able to put foes to sleep through Safeguard if used first`, function () {
@@ -41,6 +41,6 @@ describe('Yawn', function () {
]]);
battle.makeChoices();
battle.makeChoices();
- assert.strictEqual(battle.p2.active[0].status, 'slp');
+ assert.equal(battle.p2.active[0].status, 'slp');
});
});
diff --git a/test/sim/team-validator.js b/test/sim/team-validator.js
index 74c3803ec4..f19bf57387 100644
--- a/test/sim/team-validator.js
+++ b/test/sim/team-validator.js
@@ -1,6 +1,6 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
const TeamValidator = require('../../.sim-dist/team-validator').TeamValidator;
describe('Team Validator', function () {
@@ -50,7 +50,7 @@ describe('Team Validator', function () {
it('should validate Gen 2 IVs', function () {
let team = Dex.fastUnpackTeam('|raikou|||hiddenpowerwater||||14,28,26,,,|||');
let illegal = TeamValidator.get('gen2ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = Dex.fastUnpackTeam('|raikou|||hiddenpowerfire||||14,28,26,,,|||');
illegal = TeamValidator.get('gen2ou').validateTeam(team);
@@ -72,7 +72,7 @@ describe('Team Validator', function () {
{species: 'latiasmega', ability: 'levitate', item: 'latiasite', moves: ['hiddenpowerfighting'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen7ubers').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
});
it('should reject non-existent natures', function () {
@@ -96,13 +96,13 @@ describe('Team Validator', function () {
{species: 'pikachu', ability: 'static', moves: ['agility', 'protect', 'thunder', 'thunderbolt'], evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'meowstic', ability: 'prankster', moves: ['trick', 'magiccoat'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
});
it('should reject illegal movesets', function () {
@@ -137,7 +137,7 @@ describe('Team Validator', function () {
{species: 'torkoal', ability: 'drought', moves: ['bodyslam'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen7ou@@@-drought,+drought').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
illegal = TeamValidator.get('gen7ou@@@-drought,+drought,-drought').validateTeam(team);
assert(illegal);
});
@@ -148,7 +148,7 @@ describe('Team Validator', function () {
{species: 'necrozmadawnwings', ability: 'prismarmor', shiny: true, moves: ['moongeistbeam', 'metalclaw'], evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
// Shedinja should be able to take one level-up move from ninjask in gen 3-4
@@ -156,13 +156,13 @@ describe('Team Validator', function () {
{species: 'shedinja', ability: 'wonderguard', moves: ['silverwind', 'swordsdance'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen4ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'shedinja', ability: 'wonderguard', moves: ['silverwind', 'batonpass'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen3ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'shedinja', ability: 'wonderguard', moves: ['silverwind', 'swordsdance', 'batonpass'], evs: {hp: 1}},
@@ -191,7 +191,7 @@ describe('Team Validator', function () {
illegal = TeamValidator.get('gen5ou').validateTeam(team);
assert(illegal);
illegal = TeamValidator.get('gen7ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
// Slam comes from Azurill, Future Sight comes from a variety of Marill-only egg moves
@@ -227,14 +227,14 @@ describe('Team Validator', function () {
{species: 'weezing', ability: 'levitate', moves: ['painsplit', 'willowisp'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen3ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
// chainbreed smeargle to snubbull to chansey
team = [
{species: 'blissey', moves: ['present', 'healbell']},
];
illegal = TeamValidator.get('gen2ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
// the weirdest chainbreed I've ever seen:
// breed male Curse Snorlax in Gen 3, transfer to XD, teach Self-destruct
@@ -243,16 +243,16 @@ describe('Team Validator', function () {
{species: 'snorlax', ability: 'gluttony', moves: ['curse', 'selfdestruct'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen5ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
// tradeback: egg moves Swords Dance, Rock Slide; trade back to gen 1, and learn Body Slam
team = [
{species: 'marowak', moves: ['swordsdance', 'rockslide', 'bodyslam']},
];
illegal = TeamValidator.get('gen2ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
illegal = TeamValidator.get('gen1outradeback').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
illegal = TeamValidator.get('gen1ou').validateTeam(team);
assert(illegal);
@@ -288,14 +288,14 @@ describe('Team Validator', function () {
{species: 'staraptor', ability: 'reckless', moves: ['pursuit'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen5ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
// Nidoqueen can't breed but can still get egg moves from prevos
team = [
{species: 'nidoqueen', ability: 'poisonpoint', moves: ['charm'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen6ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'armaldo', ability: 'battlearmor', moves: ['knockoff', 'rapidspin'], evs: {hp: 1}},
@@ -307,27 +307,27 @@ describe('Team Validator', function () {
{species: 'hitmontop', ability: 'intimidate', moves: ["highjumpkick", 'machpunch'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen3ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'snorlax', ability: 'immunity', moves: ['curse', 'pursuit'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen4ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'charizard', ability: 'blaze', moves: ['dragondance'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen4ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
illegal = TeamValidator.get('gen5ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'dragonite', ability: 'multiscale', moves: ['extremespeed'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen5ou').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'dragonite', ability: 'multiscale', moves: ['extremespeed', 'aquajet'], evs: {hp: 1}},
@@ -341,17 +341,17 @@ describe('Team Validator', function () {
{species: 'machamp', ability: 'steadfast', moves: ['fissure'], evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'tauros', ability: 'sheerforce', moves: ['bodyslam'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'tauros', ability: 'intimidate', ivs: {hp: 31, atk: 31, def: 30, spa: 30, spd: 30, spe: 30}, moves: ['bodyslam'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'machamp', ability: 'noguard', moves: ['fissure'], evs: {hp: 1}},
@@ -370,7 +370,7 @@ describe('Team Validator', function () {
{species: 'rockruff', ability: 'owntempo', moves: ['happyhour'], evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'rockruff', level: 9, ability: 'owntempo', moves: ['happyhour'], evs: {hp: 1}},
];
@@ -380,7 +380,7 @@ describe('Team Validator', function () {
{species: 'rockruff', level: 9, ability: 'owntempo', moves: ['tackle'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'rockruff', level: 9, ability: 'steadfast', moves: ['happyhour'], evs: {hp: 1}},
];
@@ -391,7 +391,7 @@ describe('Team Validator', function () {
{species: 'lycanrocdusk', ability: 'toughclaws', moves: ['happyhour'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'lycanroc', ability: 'steadfast', moves: ['happyhour'], evs: {hp: 1}},
];
@@ -407,7 +407,7 @@ describe('Team Validator', function () {
{species: 'rayquazamega', item: 'leftovers', ability: 'airlock', moves: ['dragonascent'], evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
// mega forme ability
team = [
@@ -416,7 +416,7 @@ describe('Team Validator', function () {
{species: 'rayquazamega', item: 'leftovers', ability: 'deltastream', moves: ['dragonascent'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
});
it('should reject Ultra Necrozma where ambiguous', function () {
@@ -445,7 +445,7 @@ describe('Team Validator', function () {
let illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
assert(illegal);
illegal = TeamValidator.get('gen7anythinggoes@@@+cap').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'pikachu', ability: 'airlock', moves: ['thunderbolt'], evs: {hp: 1}},
@@ -453,7 +453,7 @@ describe('Team Validator', function () {
illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
assert(illegal);
illegal = TeamValidator.get('gen7ou@@@!obtainableabilities').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'pikachu', ability: 'airlock', moves: ['dragondance'], evs: {hp: 1}},
@@ -479,7 +479,7 @@ describe('Team Validator', function () {
{species: 'greninja', ability: 'battlebond', moves: ['surf'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen7anythinggoes@@@!Obtainable Formes,-Greninja-Ash').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
});
it('should allow Pokemon to be unbanned', function () {
@@ -487,7 +487,7 @@ describe('Team Validator', function () {
{species: 'blaziken', ability: 'blaze', moves: ['skyuppercut'], evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen7ou@@@+Blaziken').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
});
it('should allow Pokemon to be whitelisted', function () {
@@ -495,7 +495,7 @@ describe('Team Validator', function () {
{species: 'giratina', ability: 'pressure', moves: ['protect'], evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen7ubers@@@-allpokemon,+giratinaaltered').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'giratinaorigin', ability: 'levitate', moves: ['protect'], evs: {hp: 1}},
@@ -517,7 +517,7 @@ describe('Team Validator', function () {
{species: 'absol', ability: 'pressure', moves: ['batonpass'], evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen7ou@@@+Baton Pass').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
});
it('should allow items to be banned', function () {
@@ -533,7 +533,7 @@ describe('Team Validator', function () {
{species: 'eevee', ability: 'runaway', moves: ['tackle'], item: 'eeviumz', evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen7lc@@@+Eevium Z').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
});
it('should allow abilities to be banned', function () {
@@ -549,7 +549,7 @@ describe('Team Validator', function () {
{species: 'wobbuffet', ability: 'shadowtag', moves: ['counter'], evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen7ou@@@+Shadow Tag').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
});
it('should allow complex bans to be added', function () {
@@ -573,7 +573,7 @@ describe('Team Validator', function () {
{species: 'abomasnow', ability: 'snowwarning', moves: ['grasswhistle'], evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen7doublesou@@@-Gravity ++ Grass Whistle > 2').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
team = [
{species: 'smeargle', ability: 'owntempo', moves: ['gravity'], evs: {hp: 1}},
@@ -590,7 +590,7 @@ describe('Team Validator', function () {
{species: 'abomasnow', ability: 'snowwarning', moves: ['grasswhistle'], evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen7doublesou@@@+Gravity ++ Grass Whistle').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
});
it('should allow rule bundles to be removed', function () {
@@ -599,6 +599,6 @@ describe('Team Validator', function () {
{species: 'azumarill', ability: 'hugepower', moves: ['waterfall'], evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen7ou@@@!Standard').validateTeam(team);
- assert.strictEqual(illegal, null);
+ assert.equal(illegal, null);
});
});
diff --git a/test/sim/tools/exhaustive-runner.js b/test/sim/tools/exhaustive-runner.js
index efe78fc5b1..1848b48caf 100644
--- a/test/sim/tools/exhaustive-runner.js
+++ b/test/sim/tools/exhaustive-runner.js
@@ -1,6 +1,6 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
const {ExhaustiveRunner} = require('../../../.sim-dist/tools/exhaustive-runner');
@@ -10,7 +10,7 @@ describe('ExhaustiveRunner (slow)', async function () {
const opts = {prng: [1, 2, 3, 4]};
for (let format of ExhaustiveRunner.FORMATS) {
opts.format = format;
- assert.strictEqual(await (new ExhaustiveRunner(opts).run()), 0);
+ assert.equal(await (new ExhaustiveRunner(opts).run()), 0);
}
});
});
diff --git a/test/sim/tools/multi-random-runner.js b/test/sim/tools/multi-random-runner.js
index 3e32842b7d..46d9174601 100644
--- a/test/sim/tools/multi-random-runner.js
+++ b/test/sim/tools/multi-random-runner.js
@@ -1,6 +1,6 @@
'use strict';
-const assert = require('assert');
+const assert = require('assert').strict;
const {MultiRandomRunner} = require('../../../.sim-dist/tools/multi-random-runner');
@@ -8,6 +8,6 @@ describe('MultiRandomRunner (slow)', async function () {
it('should run successfully', async function () {
this.timeout(0);
const opts = {totalGames: 100, prng: [1, 2, 3, 4]};
- assert.strictEqual(await (new MultiRandomRunner(opts).run()), 0);
+ assert.equal(await (new MultiRandomRunner(opts).run()), 0);
});
});