Skip to content

Add package:spectate with PrintSpy, CallCounter, and ExitSpy - #2755

Closed
natebosch wants to merge 4 commits into
masterfrom
spectate
Closed

natebosch wants to merge 4 commits into
masterfrom
spectate

Conversation

@natebosch

Copy link
Copy Markdown
Member

Towards #994, #2671, #2742

The prints Matcher is not quite orthogonal to other expectations that
might be checked on a callback (#994).
The expectAsync pattern doesn't fit cleanly into the package:checks
patterns.

Solve both of these problems by implementing a separate, non-test
specific package which can "specate" on executing Dart code and record
details about the interactions. The records can then be checked with
typical expectation extensions.

TAG=agy
CONV=3f8ca85a-8236-4bd5-b7a1-26d64a8fb70a

Towards #994, #2671, #2742

The `prints` Matcher is not quite orthogonal to other expectations that
might be checked on a callback (#994).
The `expectAsync` pattern doesn't fit cleanly into the `package:checks`
patterns.

Solve both of these problems by implementing a separate, non-test
specific package which can "specate" on executing Dart code and record
details about the interactions. The records can then be checked with
typical expectation extensions.

TAG=agy
CONV=3f8ca85a-8236-4bd5-b7a1-26d64a8fb70a
@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

PR Health

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

@github-actions github-actions Bot added the type-infra A repository infrastructure change or enhancement label Sep 11, 2026
@kevmoo

kevmoo commented Sep 11, 2026

Copy link
Copy Markdown
Member

I like the idea of "Spy" - we can use 🥷 emjoi or something!

TAG=agy
CONV=3f8ca85a-8236-4bd5-b7a1-26d64a8fb70a
@natebosch natebosch closed this Sep 16, 2026
@natebosch
natebosch deleted the spectate branch September 16, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-infra A repository infrastructure change or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants