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

assert: add Assertions.Run to wrap testing.T.Run #1446

Open
dolmen opened this issue Jul 31, 2023 · 0 comments
Open

assert: add Assertions.Run to wrap testing.T.Run #1446

dolmen opened this issue Jul 31, 2023 · 0 comments
Labels
enhancement pkg-assert Change related to package testify/assert testing.T.Run About subtests and testing.T.Run.

Comments

@dolmen
Copy link
Collaborator

dolmen commented Jul 31, 2023

Proposed by @ernesto-jimenez in #603 (comment):

func (a *Assertions) Run(name string, subtest func(*Assertions)) {
 	a.t.Run(name, func(t *testing.T) {
 	 	subtest(New(t))
 	})
}
@dolmen dolmen added enhancement pkg-assert Change related to package testify/assert labels Jul 31, 2023
@dolmen dolmen added the testing.T.Run About subtests and testing.T.Run. label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement pkg-assert Change related to package testify/assert testing.T.Run About subtests and testing.T.Run.
Projects
None yet
Development

No branches or pull requests

1 participant