Skip to content

Add core player model tests - #372

Merged
justinfernald merged 1 commit into
masterfrom
jo/issue-324-core-model-tests
Jul 28, 2026
Merged

Add core player model tests#372
justinfernald merged 1 commit into
masterfrom
jo/issue-324-core-model-tests

Conversation

@justinfernald

Copy link
Copy Markdown
Member

Fixes #324

What changed

Replaced the complex-player-model coverage gap with six public-API behavioral tests covering:

  • complete PlayerDtoPlayerModel → DTO round-tripping
  • asynchronous waitForReady() resolution
  • SmartPlayerModel state projection and typed per-player message routing
  • reactive listener change detection and destruction cleanup
  • PlayerStore join/update/kick lifecycle with stable model identity
  • aggregate listeners for both existing and future players, including cleanup

The existing CI workflow already runs yarn coverage; this PR makes that gate exercise the player abstractions called out by the issue instead of only basic math smoke assertions.

Verification

  • yarn vitest run test/src/player-models.test.ts — 6/6 passing
  • yarn test --run — 5 files / 22 tests passing
  • yarn coverage — 5 files / 22 tests passing
    • PlayerModel.ts: 100% lines
    • SmartPlayerModel.ts: 86.84% lines
    • PlayerStore.ts: 73.5% lines
  • temporary no-reference strict TypeScript project covering src and the new test — passing
  • eslint test/src/player-models.test.ts — passing
  • yarn build — passing
  • git diff --check — passing

The repository's stock yarn type-check fails identically on untouched master with TS6305 because vite.config.d.ts has not been built from the referenced vite.config.ts. The focused no-reference TypeScript verification above passed.

Demo

Screenshots and screencasts are not applicable because this PR adds automated non-visual library coverage only. Run yarn coverage to reproduce the test and per-file coverage evidence.

@justinfernald
justinfernald merged commit 4a1d1b6 into master Jul 28, 2026
2 checks passed
@justinfernald
justinfernald deleted the jo/issue-324-core-model-tests branch July 28, 2026 00:03
@justinfernald justinfernald mentioned this pull request Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests

1 participant