Skip to content

Integrating with gomega matcher #499

@j-vizcaino

Description

@j-vizcaino

What do you want to see?

I'm trying to integrate gomega in our tests, and having a hard time doing so.

In order for gomega to be transparently integrated (ie. use Ω to trigger the matcher), a fail handler needs to be registered, with the current *testing.T.

To prevent all our tests having to call gomega's RegisterTestingT, I went with envtest.BeforeEachFeature.

This allows to use the matcher transparently, but when an assertion fails, it will fail the whole feature *testing.T instead of the Assess one.

Looking at testEnv.executeFeature highlights that the internalT object is never passed anywhere but in the Assess function.

Would you see any better way to do this?

Extra Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions