Skip to content

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

@cryonautlex
Copy link

I've found five bugs in Phaser since 2025-03-18. And then I find this, today: @zekeatchan disapproves of this golden opportunity to start adding unit-tests to Phaser. I'm losing faith in the maintainers, pure and simple.

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.

3 participants