Skip to content

Add Jest Testing Framework and Initial Test Suite #7072

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elizasviel
Copy link

This PR adds a comprehensive testing framework to the Phaser codebase using Jest, along with an initial set of unit tests for core components.

  • Set up Jest as the testing framework with appropriate configuration
  • Added test scripts to package.json (test, test:watch, test:coverage)
  • Created a mock environment for browser APIs to enable testing browser-dependent code
  • Implemented unit tests for several core components:
  • Math: Vector2, angle utilities, RandomDataGenerator
  • Geometry: Point, Rectangle
  • Core: Basic TimeStep tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants