Skip to content

Support Func<Task> overloads for WaitFor*Async methods #1833

Closed

Description

@radmorecameron

Is the feature request related to a problem? Please elaborate.
With TUnit all assertions are async so WaitForAssertionAsync isn't great

The suggested solution
Add overloads for WaitFor*Async methods that accept a Func instead of an Action

Describe any alternative solutions
None

Related: #1822 but I was able to work around it for that case so I closed that issue

Activity

  1. linkdotnet commented on May 29, 2026

    @linkdotnet
    Collaborator

    Yeah I think that is reasonable to add

  2. radmorecameron commented on May 29, 2026

    @radmorecameron
    Author

    Wow that was quick, thanks for looking into this 😄

  3. linkdotnet commented on Jun 2, 2026

    @linkdotnet
    Collaborator

    @radmorecameron Would you be willing to test against a preview version with the new API surface?

    Disclaimer: As this is not actively merged, it might have a different shape or gets dropped.

  4. radmorecameron commented on Jun 3, 2026

    @radmorecameron
    Author

    Sure thing, I guess I'll need to download it from one of these jobs? https://github.com/bUnit-dev/bUnit/actions/runs/26657517460/job/78739946905

  5. linkdotnet commented on Jun 3, 2026

    @linkdotnet
    Collaborator

    nono :D I would make a preview release on nuget. I will update that thread here in a few minutes.

  6. linkdotnet commented on Jun 3, 2026

    @linkdotnet
    Collaborator

    There we go
    Preview: 2.8.1-preview

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions