unit-test
Create and run Jest unit tests. Use when implementing tests or validating changes.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Create and run Jest unit tests. Use when implementing tests or validating changes.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Add new moves to the battle system. Use when implementing attack, status, or support moves for Pokemon.
Add a Pokemon (real or fake) to src/config/pokemonConfig.js with its moves, abilities, rarity, and evolution data. Use when the user asks to add, register, implement, or create a new Pokemon, Pokemon form, or fake/custom Pokemon in the battle system.
Find a Pokemon's Discord emoji string — canonical (e.g. `<:25:1100282072003772457>`) from `pokestar-pk-{n}`, form variants (e.g. `<:483origin:1404654211324448848>`) from `pokestar-forms-1`, or fakemon (e.g. `<:ashpikachu:1109522092283658250>`) from `pokestar-pk-extra` — via Playwright CLI. Use when the user asks for a Pokemon's emoji, emoji ID, form emoji, fakemon emoji, or needs an `<:name:snowflake>` string.
Create an implementation plan before adding one or more Pokemon via the `add-pokemon` skill. Builds Pokemon, moves, and abilities tables with all required inputs, flags unimplemented moves/abilities, and produces step-by-step implementation instructions. Use when the user asks to plan adding a Pokemon, plan a Pokemon batch, or invokes this skill before `add-pokemon`.
Verify Discord bot changes by running the bot and testing commands in Discord via Playwright CLI. Use when the user asks to test, verify, or check bot commands in Discord.
Verify a Pokemon's configuration in pokemonConfig.js by testing its moves and abilities in Discord via Playwright CLI. Use when validating a Pokemon's battle behavior after configuration changes.
| name | unit-test |
| description | Create and run Jest unit tests. Use when implementing tests or validating changes. |
Test location: src/<module>/__tests__/<name>.test.js
Run all tests:
npm test
Run specific test file:
npm test -- src/battle/data/__tests__/moves.test.js
Run tests matching a pattern:
npm test -- --testNamePattern="move.*execute"
Tests use the setup file at src/__testing__/setup.js which:
src/__testing__/mocks/database.jsinitialize()If new setup should be added for all tests, add them in this file.
Mocks for tests are located in src/__testing__/mocks. Use these utilites to create mock data for testing. If new mocks are needed, create those mocks in this directory.
Test utilities are located in src/__testing__/utils. Use these utilities when invoking commonly-reused testing functionality. If a new common test pattern should be utilized, create new utils for it here.
const { createMockBattle } = require("../../../__testing__/mocks/battle");
const {
getValidTargetForMove,
givePokemonMove,
} = require("../../../__testing__/utils/battle");
describe("Feature Name", () => {
it("should do something", () => {
const { battle } = createMockBattle({ autoStart: true });
// Arrange
const { activePokemon } = battle;
// Act
// ... perform action
// Assert
expect(result).toBe(expected);
});
});
For additional instructions, refer to the following skills on how to create tests:
test-move: Create tests for Pokemon Battle movesAfter implementing a feature that has tests, run the relevant test suite:
npm test -- <path-to-test-file>
If tests fail: