Skip to content

Nested ensure.New support

Compare
Choose a tag to compare
@JosiahWitt JosiahWitt released this 18 Jun 20:23
· 111 commits to master since this release
fd3a99f

Allow created a new instance of ensure with a different testing context when th ensure package has been shadowed by the ensure variable.

For example:

ensure := ensure.New(t)

// ...

t.Run("important tests", func(t *testing.T) {
  ensure := ensure.New(t)

  // ...
})