Skip to content

Add more strongly typed wrapper around test.macro - #3883

Merged
mbg merged 3 commits into
mainfrom
mbg/test/macro-wrapper
May 7, 2026
Merged

mbg merged 3 commits into
mainfrom
mbg/test/macro-wrapper

Conversation

@mbg

@mbg mbg commented May 7, 2026

Copy link
Copy Markdown
Member

When defining a test macro using test.macro, the argument types are not strongly enforced when the macro is used with test, test.serial, etc.

This PR adds a makeMacro helper which returns a wrapper around a macro that enforces the argument types.

Replaces #3873.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Environments:

  • Testing/None - This change does not impact any CodeQL workflows in production.

How did/will you validate this change?

  • Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files).

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Development/testing only - This change cannot cause any failures in production.

How will you know if something goes wrong after this change is released?

  • Other - Please provide details.

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL May be very hard to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants