From e8f40c10c948606e61a6660d8978e17e92491f4a Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Sat, 5 Oct 2024 16:52:13 -0700 Subject: [PATCH] [Test] Update `create-test` script for linting changes (#4587) Add additional boilerplate code Change prompt to be slightly more accurate Co-authored-by: Adrian T. <68144167+torranx@users.noreply.github.com> --- create-test-boilerplate.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/create-test-boilerplate.js b/create-test-boilerplate.js index 5f4bbc41198..a365999c623 100644 --- a/create-test-boilerplate.js +++ b/create-test-boilerplate.js @@ -49,7 +49,7 @@ async function promptFileName(selectedType) { { type: "input", name: "userInput", - message: `Please provide a file name for the ${selectedType} test:`, + message: `Please provide the name of the ${selectedType}:`, }, ]); @@ -110,7 +110,7 @@ import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; import GameManager from "#test/utils/gameManager"; import Phaser from "phaser"; -import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; +import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; describe("${description}", () => { let phaserGame: Phaser.Game; @@ -129,15 +129,22 @@ describe("${description}", () => { beforeEach(() => { game = new GameManager(phaserGame); game.override - .moveset([Moves.SPLASH]) + .moveset([ Moves.SPLASH ]) + .ability(Abilities.BALL_FETCH) .battleType("single") + .disableCrits() + .enemySpecies(Species.MAGIKARP) .enemyAbility(Abilities.BALL_FETCH) .enemyMoveset(Moves.SPLASH); }); - it("test case", async () => { - // await game.classicMode.startBattle([Species.MAGIKARP]); - // game.move.select(Moves.SPLASH); + it("should do X", async () => { + await game.classicMode.startBattle([ Species.FEEBAS ]); + + game.move.select(Moves.SPLASH); + await game.phaseInterceptor.to("BerryPhase"); + + expect(true).toBe(true); }); }); `;