[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>
This commit is contained in:
NightKev 2024-10-05 16:52:13 -07:00 committed by GitHub
parent 42b75e8440
commit e8f40c10c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 6 deletions

View File

@ -49,7 +49,7 @@ async function promptFileName(selectedType) {
{ {
type: "input", type: "input",
name: "userInput", 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 { Species } from "#enums/species";
import GameManager from "#test/utils/gameManager"; import GameManager from "#test/utils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, it, expect } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
describe("${description}", () => { describe("${description}", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -129,15 +129,22 @@ describe("${description}", () => {
beforeEach(() => { beforeEach(() => {
game = new GameManager(phaserGame); game = new GameManager(phaserGame);
game.override game.override
.moveset([Moves.SPLASH]) .moveset([ Moves.SPLASH ])
.ability(Abilities.BALL_FETCH)
.battleType("single") .battleType("single")
.disableCrits()
.enemySpecies(Species.MAGIKARP)
.enemyAbility(Abilities.BALL_FETCH) .enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(Moves.SPLASH); .enemyMoveset(Moves.SPLASH);
}); });
it("test case", async () => { it("should do X", async () => {
// await game.classicMode.startBattle([Species.MAGIKARP]); await game.classicMode.startBattle([ Species.FEEBAS ]);
// game.move.select(Moves.SPLASH);
game.move.select(Moves.SPLASH);
await game.phaseInterceptor.to("BerryPhase");
expect(true).toBe(true);
}); });
}); });
`; `;