Releases: JosiahWitt/ensure
Releases · JosiahWitt/ensure
CLI: Support Go 1.23+
Supports Go 1.23+ via #81 and bumps the minimum CLI Go version to 1.21.
Add ensure.RunParallel
Adds ensure.RunParallel
, which calls testing.T.Parallel just before calling the provided function, causing it to be run in parallel with (and only with) other parallel tests.
Add InterfaceT method
Changes
- You can now call
ensure.InterfaceT()
to get the scopedensuring.T
interface. It's still recommended to useensure.T()
for most cases, as it returns the fulltesting.T
.
exp/entable: v0.1.0 Beta 3
Changes
- Adds a new experimental
exp/entable
module that contains theentable.Table
helper for building table-driven tests- This release adds more test coverage and has no external change
- This module was renamed from
experiment/entable
inv0.1.0-beta.1
exp/entable: v0.1.0 Beta 2
Changes
- Adds a new experimental
exp/entable
module that contains theentable.Table
helper for building table-driven tests- This module was renamed from
experiment/entable
inv0.1.0-beta.1
- This release removes
T
,G
, andBuilder
in favor of a singleTable
type with which to build and run all variations of tables
- This module was renamed from
v0.4.1
Changes
SetupMocks
in table driven tests now takesensuring.E
as an optional second argument. This provides a correctly scopedensure
insideSetupMocks
.
v0.4.0
Changes
- Global
- Renamed
ensurepkg
toensuring
andensurepkg.Ensure
toensuring.E
in a backwards compatible way.ensurepkg
is marked as deprecated, and you are encourage to find and replace all references at your earliest convenience.ensurepkg
may be removed in an upcoming release.
- Renamed
ensure.RunTableByIndex
:- The underlying implementation was refactored from the ground up to make it much more testable and extensible in the future
- Mocks can be completely ignored using the
`ensure:"-"`
tag, in addition to the existing`ensure:"ignoreunused"`
tag for making them optional ⚠️ Breaking Change: Unused mocks are now an error unless they are ignored (`ensure:"-"`
) or optional (`ensure:"ignoreunused"`
)- Warnings are no longer issued, since unused mocks are now an error
- Supports embedded pointer fields in structs and mocks instead of only embedded non-pointer fields
- Correctly handles "shadowed" fields in embedded fields in both
Subject
andMocks
- Duplicate mocks are now supported, but will cause errors when matching a Subject, unless one of them is ignored (
`ensure:"-"`
) or optional (`ensure:"ignoreunused"`
)
experiment/entable: v0.1.0 Beta 1
Changes
- Adds a new experimental
experiment/entable
module that contains helpers for building table-driven tests. These includeentable.T
for building a table,entable.G
for building a table nested within a group, andentable.Builder
for building complex collections of entries, tables, and groups.
v0.4.0 Beta 3
Since v0.4.0
is going to be a larger release, we're starting with a short series of beta releases.
Changes
- Global
- Renamed
ensurepkg
toensuring
andensurepkg.Ensure
toensuring.E
in a backwards compatible way.ensurepkg
is marked as deprecated, and you are encourage to find and replace all references at your earliest convenience.ensurepkg
may be removed in an upcoming release.
- Renamed
ensure.RunTableByIndex
:- The underlying implementation was refactored from the ground up to make it much more extensible and testable in the future
- Mocks can be completely ignored using the
`ensure:"-"`
tag, in addition to the existing`ensure:"ignoreunused"`
tag for making them optional ⚠️ Breaking Change: Unused mocks are now an error unless they are ignored (`ensure:"-"`
) or optional (`ensure:"ignoreunused"`
)- Warnings are no longer issued, since unused mocks are now an error
- Supports embedded pointer fields in structs and mocks instead of only embedded non-pointer fields
- Correctly handles "shadowed" fields in embedded fields in both
Subject
andMocks
- Duplicate mocks are now supported, but will cause errors when matching a Subject, unless one of them is ignored (
`ensure:"-"`
) or optional (`ensure:"ignoreunused"`
)
v0.4.0 Beta 2
Since v0.4.0
is going to be a larger release, we're starting with a short series of beta releases.
Changes
- Global
- Renamed
ensurepkg
toensurer
andensurepkg.Ensure
toensurer.E
in a backwards compatible way.ensurepkg
is marked as deprecated, and you are encourage to find and replace all references at your earliest convenience.ensurepkg
may be removed in an upcoming release.
- Renamed
ensure.RunTableByIndex
:- The underlying implementation was refactored from the ground up to make it much more extensible and testable in the future
- Mocks can be completely ignored using the
`ensure:"-"`
tag, in addition to the existing`ensure:"ignoreunused"`
tag for making them optional ⚠️ Breaking Change: Unused mocks are now an error unless they are ignored (`ensure:"-"`
) or optional (`ensure:"ignoreunused"`
)- Warnings are no longer issued, since unused mocks are now an error
- Supports embedded pointer fields in structs and mocks instead of only embedded non-pointer fields
- Correctly handles "shadowed" fields in embedded fields in both
Subject
andMocks
- Duplicate mocks are now supported, but will cause errors when matching a Subject, unless one of them is ignored (
`ensure:"-"`
) or optional (`ensure:"ignoreunused"`
)