Skip to content

Releases: JosiahWitt/ensure

CLI: Support Go 1.23+

02 Dec 17:21
058de76
Compare
Choose a tag to compare

Supports Go 1.23+ via #81 and bumps the minimum CLI Go version to 1.21.

Add ensure.RunParallel

08 May 23:43
7386ab6
Compare
Choose a tag to compare

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

03 Mar 12:42
2ec9e16
Compare
Choose a tag to compare

Changes

  • You can now call ensure.InterfaceT() to get the scoped ensuring.T interface. It's still recommended to use ensure.T() for most cases, as it returns the full testing.T.

exp/entable: v0.1.0 Beta 3

03 Mar 13:43
a9f02d7
Compare
Choose a tag to compare
Pre-release

Changes

  • Adds a new experimental exp/entable module that contains the entable.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 in v0.1.0-beta.1

exp/entable: v0.1.0 Beta 2

27 Feb 13:43
17a75fc
Compare
Choose a tag to compare
Pre-release

Changes

  • Adds a new experimental exp/entable module that contains the entable.Table helper for building table-driven tests
    • This module was renamed from experiment/entable in v0.1.0-beta.1
    • This release removes T, G, and Builder in favor of a single Table type with which to build and run all variations of tables

v0.4.1

21 Feb 12:54
8e77804
Compare
Choose a tag to compare

Changes

  • SetupMocks in table driven tests now takes ensuring.E as an optional second argument. This provides a correctly scoped ensure inside SetupMocks.

v0.4.0

21 Feb 12:50
2e6f290
Compare
Choose a tag to compare

Changes

  • Global
    • Renamed ensurepkg to ensuring and ensurepkg.Ensure to ensuring.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.
  • 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 and Mocks
    • 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

13 Feb 02:39
2e6f290
Compare
Choose a tag to compare
Pre-release

Changes

  • Adds a new experimental experiment/entable module that contains helpers for building table-driven tests. These include entable.T for building a table, entable.G for building a table nested within a group, and entable.Builder for building complex collections of entries, tables, and groups.

v0.4.0 Beta 3

08 Feb 01:47
d19bedc
Compare
Choose a tag to compare
v0.4.0 Beta 3 Pre-release
Pre-release

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 to ensuring and ensurepkg.Ensure to ensuring.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.
  • 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 and Mocks
    • 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

05 Feb 17:30
355c722
Compare
Choose a tag to compare
v0.4.0 Beta 2 Pre-release
Pre-release

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 to ensurer and ensurepkg.Ensure to ensurer.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.
  • 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 and Mocks
    • Duplicate mocks are now supported, but will cause errors when matching a Subject, unless one of them is ignored (`ensure:"-"`) or optional (`ensure:"ignoreunused"`)