Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement FatalReporter #187

Closed
gavv opened this issue Dec 2, 2022 · 2 comments
Closed

Implement FatalReporter #187

gavv opened this issue Dec 2, 2022 · 2 comments
Assignees
Labels
feature New feature or request good first issue Good for newcomers help wanted Contributions are welcome important Important task
Milestone

Comments

@gavv
Copy link
Owner

gavv commented Dec 2, 2022

In reporter.go, we already have AssertReporter (uses testify/assert) and RequireReporter (uses testify/require), for non-fatal and fatal assertions, respectively.

If you don't use testify, you can directly use testing.T as reporter. httpexpect will call its Errorf method, so assertions will be non-fatal.

If you don't use testify, and want fatal assertions, you have to write your own reporter that invokes t.Fatalf. It would be nice to fill this gap and provide FatalReporter that does that for you - provides Errorf method that just invokes t.Fatalf.

Note: FatalReporter should use testing.TB interface, not testing.T struct.

Note: we should also update comments for Reporter interface and Config.Reporter field. Those comments list available reporter implementations.

@gavv gavv added feature New feature or request help wanted Contributions are welcome important Important task labels Dec 2, 2022
@gavv gavv added the good first issue Good for newcomers label Jan 2, 2023
@kairemor
Copy link
Contributor

Can I check this?

@gavv
Copy link
Owner Author

gavv commented Jan 12, 2023

You're welcome!

@gavv gavv closed this as completed Jan 26, 2023
@gavv gavv added this to the v2 milestone Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers help wanted Contributions are welcome important Important task
Projects
None yet
Development

No branches or pull requests

2 participants