Skip to content

chore(test): remove stale class-API tests (closes #11)#13

Merged
Taure merged 1 commit into
mainfrom
chore/cleanup-stale-tests-issue-11
May 2, 2026
Merged

chore(test): remove stale class-API tests (closes #11)#13
Taure merged 1 commit into
mainfrom
chore/cleanup-stale-tests-issue-11

Conversation

@Taure
Copy link
Copy Markdown
Contributor

@Taure Taure commented May 2, 2026

Summary

The test/ suite targeted a deleted class-based API and a flame_test version that has since changed shape (gameTester.test is gone, MatchInput constructor signature shifted to required-named down, PlayerBuilder/ProjectileBuilder typedefs changed). flutter analyze was reporting ~42 errors plus dozens of dynamic-call infos. Closes #11.

Decision per file

File Decision Rationale
test/asobi_input_sender_test.dart delete Mixin host pattern correct, but gameTester.test + MatchInput(...) signatures broken; rewrite cost > value given smoke coverage exists
test/asobi_matchmaker_test.dart delete Same — flame_test API drift, no class-API issue
test/asobi_network_sync_test.dart delete PlayerBuilder/ProjectileBuilder typedef shape changed; would need full rewrite
test/asobi_player_test.dart delete Already used mixin host (with AsobiPlayer); blocked by gameTester.test
test/asobi_projectile_test.dart delete Same as player_test

No file was a 5-minute port — the chosen direction is consistent with the issue's preferred fallback ("delete them and rely on the smoke test as the sole CI signal until proper widget tests exist").

A short test/README.md was added documenting the testing strategy.

Coverage gaps (follow-up)

smoke_tests/smoke.dart exercises the SDK contract surface (AsobiClient, realtime matchmaking, match.input -> match.state round-trip) but does not exercise any Flame-side mixin behavior:

  • HasAsobiInput: keyboard tracking, mouse aim, inputSendInterval batching
  • HasAsobiMatchmaker: findMatch / cancelSearch / searchTime accumulation, lifecycle callbacks
  • AsobiNetworkSync: player + projectile component create/remove from MatchState diffs, local player identification, onStateUpdate / onMatchFinished callbacks
  • AsobiPlayer mixin: initPlayer, applyServerState, lerp, isDead, label defaults
  • AsobiProjectile mixin: initProjectile, applyServerState with pixelsPerUnit

Proper widget tests for the mixin-based components are a future task and should be tracked separately.

flutter analyze

11 issues found. (ran in 1.8s)

All 11 are pre-existing infos / one warning in lib/, example/, and pubspec.yaml — zero errors, none introduced by this change.

flutter test

Test directory "test" does not appear to contain any test files.
Test files must be in that directory and end with the pattern "_test.dart".

Expected — CI signal now comes from smoke_tests/smoke.dart.

Test plan

  • flutter analyze returns zero errors
  • flutter test runs cleanly (reports no test files, as designed)
  • Reviewer confirms smoke test is sufficient as sole CI signal until widget tests land

The test/ suite targeted a deleted class-based API and a flame_test
version that has since changed shape, producing ~70 analyzer errors.
Smoke test in smoke_tests/smoke.dart already provides end-to-end CI
signal against sdk_demo_backend; widget tests for the new mixin API
are a future task.
@Taure Taure merged commit 9de2363 into main May 2, 2026
1 check passed
@Taure Taure deleted the chore/cleanup-stale-tests-issue-11 branch May 2, 2026 08:42
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.

test/: ~70 analyzer errors from class -> mixin migration

1 participant