Skip to content

Releases: onsi/gomega

v1.23.0

26 Oct 19:11
Compare
Choose a tag to compare

1.23.0

Features

  • Custom formatting on a per-type basis can be provided using format.RegisterCustomFormatter() -- see the docs here

  • Substantial improvement have been made to StopTrying():

    • Users can now use StopTrying().Wrap(err) to wrap errors and StopTrying().Attach(description, object) to attach arbitrary objects to the StopTrying() error
    • StopTrying() is now always interpreted as a failure. If you are an early adopter of StopTrying() you may need to change your code as the prior version would match against the returned value even if StopTrying() was returned. Going forward the StopTrying() api should remain stable.
    • StopTrying() and StopTrying().Now() can both be used in matchers - not just polled functions.
  • TryAgainAfter(duration) is used like StopTrying() but instructs Eventually and Consistently that the poll should be tried again after the specified duration. This allows you to dynamically adjust the polling duration.

  • ctx can now be passed-in as the first argument to Eventually and Consistently.

Maintenance

  • Bump github.com/onsi/ginkgo/v2 from 2.3.0 to 2.3.1 (#597) [afed901]
  • Bump nokogiri from 1.13.8 to 1.13.9 in /docs (#599) [7c691b3]
  • Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 (#587) [ff22665]

v1.22.1

11 Oct 23:12
Compare
Choose a tag to compare

1.22.1

Fixes

  • When passed a context and no explicit timeout, Eventually will only timeout when the context is cancelled [e5105cf]
  • Allow StopTrying() to be wrapped [bf3cba9]

Maintenance

v1.22.0

11 Oct 19:39
Compare
Choose a tag to compare

1.22.0

Features

Several improvements have been made to Eventually and Consistently in this and the most recent releases:

  • Eventually and Consistently can take a context.Context [65c01bc]
    This enables integration with Ginkgo 2.3.0's interruptible nodes and node timeouts.
  • Eventually and Consistently that are passed a SpecContext can provide reports when an interrupt occurs [0d063c9]
  • Eventually/Consistently will forward an attached context to functions that ask for one [e2091c5]
  • Eventually/Consistently supports passing arguments to functions via WithArguments() [a2dc7c3]
  • Eventually and Consistently can now be stopped early with StopTrying(message) and StopTrying(message).Now() [52976bb]

These improvements are all documented in Gomega's docs

v1.21.1

06 Oct 20:45
Compare
Choose a tag to compare

v1.21.1

Features

  • Eventually and Consistently that are passed a SpecContext can provide reports when an interrupt occurs [0d063c9]

v1.21.0

06 Oct 18:56
Compare
Choose a tag to compare

1.21.0

Features

  • Eventually and Consistently can take a context.Context [65c01bc]
    This enables integration with Ginkgo 2.3.0's interruptible nodes and node timeouts.
  • Introduces Eventually.Within.ProbeEvery with tests and documentation (#591) [f633800]
  • New BeKeyOf matcher with documentation and unit tests (#590) [fb586b3]

Fixes

  • Cover the entire gmeasure suite with leak detection [8c54344]
  • Fix gmeasure leak [119d4ce]
  • Ignore new Ginkgo ProgressSignal goroutine in gleak [ba548e2]

Maintenance

  • Fixes crashes on newer Ruby 3 installations by upgrading github-pages gem dependency (#596) [12469a0]

v1.20.2

31 Aug 14:10
Compare
Choose a tag to compare

1.20.2

Fixes

  • label specs that rely on remote access; bump timeout on short-circuit test to make it less flaky [35eeadf]
  • gexec: allow more headroom for SIGABRT-related unit tests (#581) [5b78f40]
  • Enable reading from a closed gbytes.Buffer (#575) [061fd26]

Maintenance

  • Bump github.com/onsi/ginkgo/v2 from 2.1.5 to 2.1.6 (#583) [55d895b]
  • Bump github.com/onsi/ginkgo/v2 from 2.1.4 to 2.1.5 (#582) [346de7c]

v1.20.1

26 Aug 19:45
Compare
Choose a tag to compare

1.20.1

Fixes

Maintenance

  • test: add new Go 1.19 to test matrix (#571) [40d7efe]
  • Bump tzinfo from 1.2.9 to 1.2.10 in /docs (#564) [5f26371]

v1.20.0

20 Jul 15:58
Compare
Choose a tag to compare

Features

  • New gleak experimental goroutine leak detection package! (#538) [85ba7bc]
  • New BeComparableTo matcher(#546) that uses gocmp to make comparisons [e77ea75]
  • New HaveExistingField matcher (#553) [fd130e1]
  • Document how to wrap Gomega (#539) [56714a4]

Fixes

Maintenance

  • Bump various dependencies:

1.19.0

Features

  • New HaveEach matcher to ensure that each and every element in an array, slice, or map satisfies the passed in matcher. (#523) [9fc2ae2] (#524) [c8ba582]
  • Users can now wrap the Gomega interface to implement custom behavior on each assertion. (#521) [1f2e714]
  • ContainElement now accepts an additional pointer argument. Elements that satisfy the matcher are stored in the pointer enabling developers to easily add subsequent, more detailed, assertions against the matching element. (#527) [1a4e27f]

Fixes

v1.19.0

25 Mar 19:12
Compare
Choose a tag to compare

Features

  • New HaveEach matcher to ensure that each and every element in an array, slice, or map satisfies the passed in matcher. (#523) [9fc2ae2] (#524) [c8ba582]
  • Users can now wrap the Gomega interface to implement custom behavior on each assertion. (#521) [1f2e714]
  • ContainElement now accepts an additional pointer argument. Elements that satisfy the matcher are stored in the pointer enabling developers to easily add subsequent, more detailed, assertions against the matching element. (#527) [1a4e27f]

Fixes

v1.18.1

27 Jan 19:11
Compare
Choose a tag to compare
  • add pointer support to HaveField matcher (#495) [79e41a3]