This issue aims to introduce automated tests for key components of the Plat-Engine to improve code quality, catch regressions early, and ensure stability as new features are added.
Components to Test
- Core Initialization and Configuration: Verify that the engine initializes correctly with default and custom settings.
- Renderer: Test rendering pipeline, draw calls, and scene graph updates.
- Physics Engine: Validate collision detection, movement integration, and physics responses.
- Input Handling: Ensure user inputs are correctly captured and processed.
- Entity System: Test entity creation, component addition/removal, and update loops.
- Resource Loader: Confirm assets (textures, sounds, levels) load correctly and handle errors gracefully.
- Level Management: Verify level loading, saving, and transitions.
Goals
- Select and configure a testing framework (e.g., Jest, Mocha).
- Add unit tests covering public interfaces of each module.
- Integrate tests into CI (e.g., GitHub Actions) to run on each PR.
- Document testing guidelines and conventions for future contributors.
Acceptance Criteria
- Tests exist for all listed components.
- CI pipeline passes all tests on PR and main branch.
- Documentation added/updated with instructions on how to run tests locally.
This issue aims to introduce automated tests for key components of the Plat-Engine to improve code quality, catch regressions early, and ensure stability as new features are added.
Components to Test
Goals
Acceptance Criteria