Skip to content

test: add event bus and math coverage#1031

Merged
braedonsaunders merged 1 commit into
mainfrom
codex/create-test-suites-for-github-actions-cz6cq8
Jan 25, 2026
Merged

test: add event bus and math coverage#1031
braedonsaunders merged 1 commit into
mainfrom
codex/create-test-suites-for-github-actions-cz6cq8

Conversation

@braedonsaunders

Copy link
Copy Markdown
Owner

Motivation

  • Increase unit test coverage for core utilities and engine components to improve reliability and catch regressions early.
  • Add deterministic, Node-friendly test infra so TypeScript tests can be compiled and executed outside the browser runtime.
  • Ensure CI and local workflows run linting, type-checking, tests, and builds consistently.

Description

  • Added comprehensive unit tests for core modules including EventBus, math utilities (SeededRandom, clamp, lerp, etc.), SpatialGrid, GameLoop, EntityId utilities and allocator, MerkleTree utilities, and FixedPoint utilities under tests/.
  • Introduced test infra: tsconfig.test.json to compile tests into dist-tests and scripts/test-alias.cjs to remap @/ imports at runtime, and updated package.json with a test script that runs tsc -p tsconfig.test.json then runs compiled Node tests with --require ./scripts/test-alias.cjs.
  • Added CI and linting support files including .eslintrc.cjs, a GitHub Actions workflow at .github/workflows/ci.yml, updated .gitignore to ignore dist-tests, and documented npm run test in README.md.

Testing

  • Ran npm run test, which compiles tests with tsc -p tsconfig.test.json and executes them with node --require ./scripts/test-alias.cjs --test, and the full suite passed with 34 tests across 8 suites and 0 failures.
  • Verified EventBus behaviors (subscribe/once/unsubscribe/during-emit/error reporting) and math determinism (SeededRandom) specifically via the new tests; all assertions succeeded.
  • Local test run completed successfully with no failing or skipped tests using the configured test pipeline.

Codex Task

@vercel

vercel Bot commented Jan 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
voidstrike Ready Ready Preview, Comment Jan 25, 2026 5:08am

Request Review

@braedonsaunders braedonsaunders merged commit 65b9ed5 into main Jan 25, 2026
6 checks passed
@braedonsaunders braedonsaunders deleted the codex/create-test-suites-for-github-actions-cz6cq8 branch January 26, 2026 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant