Build foundation for game engine testing with comprehensive mocks and utilities: Infrastructure Created: - src/test/mocks/phaser.ts (33 tests) * MockEventEmitter - Event system with on/once/off/emit * MockScene - Scene lifecycle and factories * MockGame - Game instance with scale and scene manager * MockContainer - Game object container with child management * MockSprite - Image sprites with texture support * MockText - Styled text objects * MockGraphics - Shape drawing API * MockLoader - Asset loading simulation - src/test/helpers/gameTestUtils.ts (22 tests) * createMockGameState() - Complete game state with players * createMockCardDefinition() - Card definitions with type helpers * createMockCardInstance() - Card instances with damage/status * createGameScenario() - Full game setups with cards in zones * setupMockScene() - Scene setup with game instance * Type-specific helpers: createMockPokemonCard(), createMockEnergyCard(), etc. - src/test/README.md * Complete documentation with usage examples * Testing patterns and best practices * Troubleshooting guide This infrastructure enables testing of all Phaser game objects (Board, Card, Zone, MatchScene, etc.) without requiring WebGL/Canvas. All 1,256 tests passing. Foundation for TEST-002 through TEST-009 (scene and state testing). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| project_plans | ||
| public | ||
| src | ||
| .env.development | ||
| .env.production | ||
| .gitignore | ||
| CLAUDE.md | ||
| eslint.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| PROJECT_PLAN_FRONTEND.json | ||
| PROJECT_PLAN_TEST_COVERAGE.json | ||
| README.md | ||
| TEST_COVERAGE_PLAN.md | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
| vitest.config.ts | ||
Vue 3 + TypeScript + Vite
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
Learn more about the recommended Project Setup and IDE Support in the Vue Docs TypeScript Guide.