Skip to content

Research: replace direct usage of markTestRunStart with onTestRunStart hook#7568

Closed
schaable wants to merge 1 commit intomainfrom
test-hooks-demo
Closed

Research: replace direct usage of markTestRunStart with onTestRunStart hook#7568
schaable wants to merge 1 commit intomainfrom
test-hooks-demo

Conversation

@schaable
Copy link
Copy Markdown
Member

@schaable schaable commented Oct 9, 2025

On this PR I've demonstrated that the helper functions exported from the coverage and gas-analytics plugins can be replaced by using hooks for the test task, with handlers defined directly in those plugins.

In this demo, I've removed the markTestRunStart function call from the test runner actions and replaced it with the onTestRunStart hook. The same approach can be applied to markTestRunDone and markTestWorkerDone, eliminating the plugin dependency as well as allowing users to define their own handlers.

Note: Hook names and types are illustrative only. This PR is not intended to be merged.

@schaable schaable requested a review from alcuadrado October 9, 2025 17:59
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Oct 9, 2025

⚠️ No Changeset found

Latest commit: fadfc05

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@schaable schaable self-assigned this Oct 20, 2025
@schaable schaable closed this Oct 20, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jan 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant