8000 add New and NewRelaxed methods to support sub tests · Issue #1 · matryer/is · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

add New and NewRelaxed methods to support sub tests #1

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

Closed
matryer opened this issue Dec 11, 2016 · 0 comments
Closed

add New and NewRelaxed methods to support sub tests #1

matryer opened this issue Dec 11, 2016 · 0 comments

Comments

@matryer
Copy link
Owner
matryer commented Dec 11, 2016

Adding New and NewRelaxed methods to the I object will allow subtests to work using the normal pattern:

func Test(t *testing.T) {
  is := is.New(t)
  t.Run("sub1", func(t *testing.T){
    is := is.New(t)
    is.Equal(1, 1) // should be equal
  })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0