...
1## 1.33.1
2
3### Fixes
4- fix confusing eventually docs [3a66379]
5
6### Maintenance
7- Bump github.com/onsi/ginkgo/v2 from 2.17.1 to 2.17.2 [e9bc35a]
8
9## 1.33.0
10
11### Features
12
13`Receive` not accepts `Receive(<POINTER>, MATCHER>)`, allowing you to pick out a specific value on the channel that satisfies the provided matcher and is stored in the provided pointer.
14
15### Maintenance
16- Bump github.com/onsi/ginkgo/v2 from 2.15.0 to 2.17.1 (#745) [9999deb]
17- Bump github-pages from 229 to 230 in /docs (#735) [cb5ff21]
18- Bump golang.org/x/net from 0.20.0 to 0.23.0 (#746) [bac6596]
19
20## 1.32.0
21
22### Maintenance
23- Migrate github.com/golang/protobuf to google.golang.org/protobuf [436a197]
24
25 This release drops the deprecated github.com/golang/protobuf and adopts google.golang.org/protobuf. Care was taken to ensure the release is backwards compatible (thanks @jbduncan !). Please open an issue if you run into one.
26
27- chore: test with Go 1.22 (#733) [32ef35e]
28- Bump golang.org/x/net from 0.19.0 to 0.20.0 (#717) [a0d0387]
29- Bump github-pages and jekyll-feed in /docs (#732) [b71e477]
30- docs: fix typo and broken anchor link to gstruct [f460154]
31- docs: fix HaveEach matcher signature [a2862e4]
32
33## 1.31.1
34
35### Fixes
36- Inverted arguments order of FailureMessage of BeComparableToMatcher [e0dd999]
37- Update test in case keeping msg is desired [ad1a367]
38
39### Maintenance
40- Show how to import the format sub package [24e958d]
41- tidy up go.sum [26661b8]
42- bump dependencies [bde8f7a]
43
44## 1.31.0
45
46### Features
47- Async assertions include context cancellation cause if present [121c37f]
48
49### Maintenance
50- Bump minimum go version [dee1e3c]
51- docs: fix typo in example usage "occured" -> "occurred" [49005fe]
52- Bump actions/setup-go from 4 to 5 (#714) [f1c8757]
53- Bump github/codeql-action from 2 to 3 (#715) [9836e76]
54- Bump github.com/onsi/ginkgo/v2 from 2.13.0 to 2.13.2 (#713) [54726f0]
55- Bump golang.org/x/net from 0.17.0 to 0.19.0 (#711) [df97ecc]
56- docs: fix `HaveExactElement` typo (#712) [a672c86]
57
58## 1.30.0
59
60### Features
61- BeTrueBecause and BeFalseBecause allow for better failure messages [4da4c7f]
62
63### Maintenance
64- Bump actions/checkout from 3 to 4 (#694) [6ca6e97]
65- doc: fix type on gleak go doc [f1b8343]
66
67## 1.29.0
68
69### Features
70- MatchError can now take an optional func(error) bool + description [2b39142]
71
72## 1.28.1
73
74### Maintenance
75- Bump github.com/onsi/ginkgo/v2 from 2.12.0 to 2.13.0 [635d196]
76- Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 [14f8859]
77- Bump golang.org/x/net from 0.14.0 to 0.17.0 [d8a6508]
78- #703 doc(matchers): HaveEach() doc comment updated [2705bdb]
79- Minor typos (#699) [375648c]
80
81## 1.28.0
82
83### Features
84- Add VerifyHost handler to ghttp (#698) [0b03b36]
85
86### Fixes
87- Read Body for Newer Responses in HaveHTTPBodyMatcher (#686) [18d6673]
88
89### Maintenance
90- Bump github.com/onsi/ginkgo/v2 from 2.11.0 to 2.12.0 (#693) [55a33f3]
91- Typo in matchers.go (#691) [de68e8f]
92- Bump commonmarker from 0.23.9 to 0.23.10 in /docs (#690) [ab17f5e]
93- chore: update test matrix for Go 1.21 (#689) [5069017]
94- Bump golang.org/x/net from 0.12.0 to 0.14.0 (#688) [babe25f]
95
96## 1.27.10
97
98### Fixes
99- fix: go 1.21 adding goroutine ID to creator+location (#685) [bdc7803]
100
101## 1.27.9
102
103### Fixes
104- Prevent nil-dereference in format.Object for boxed nil error (#681) [3b31fc3]
105
106### Maintenance
107- Bump golang.org/x/net from 0.11.0 to 0.12.0 (#679) [360849b]
108- chore: use String() instead of fmt.Sprintf (#678) [86f3659]
109- Bump golang.org/x/net from 0.10.0 to 0.11.0 (#674) [642ead0]
110- chore: unnecessary use of fmt.Sprintf (#677) [ceb9ca6]
111- Bump github.com/onsi/ginkgo/v2 from 2.10.0 to 2.11.0 (#675) [a2087d8]
112- docs: fix ContainSubstring references (#673) [fc9a89f]
113- Bump github.com/onsi/ginkgo/v2 from 2.9.7 to 2.10.0 (#671) [9076019]
114
115## 1.27.8
116
117### Fixes
118- HaveExactElement should not call FailureMessage if a submatcher returned an error [096f392]
119
120### Maintenance
121- Bump github.com/onsi/ginkgo/v2 from 2.9.5 to 2.9.7 (#669) [8884bee]
122
123## 1.27.7
124
125### Fixes
126- fix: gcustom.MakeMatcher accepts nil as actual value (#666) [57054d5]
127
128### Maintenance
129- update gitignore [05c1bc6]
130- Bump github.com/onsi/ginkgo/v2 from 2.9.4 to 2.9.5 (#663) [7cadcf6]
131- Bump golang.org/x/net from 0.9.0 to 0.10.0 (#662) [b524839]
132- Bump github.com/onsi/ginkgo/v2 from 2.9.2 to 2.9.4 (#661) [5f44694]
133- Bump commonmarker from 0.23.8 to 0.23.9 in /docs (#657) [05dc99a]
134- Bump nokogiri from 1.14.1 to 1.14.3 in /docs (#658) [3a033d1]
135- Replace deprecated NewGomegaWithT with NewWithT (#659) [a19238f]
136- Bump golang.org/x/net from 0.8.0 to 0.9.0 (#656) [29ed041]
137- Bump actions/setup-go from 3 to 4 (#651) [11b2080]
138
139## 1.27.6
140
141### Fixes
142- Allow collections matchers to work correctly when expected has nil elements [60e7cf3]
143
144### Maintenance
145- updates MatchError godoc comment to also accept a Gomega matcher (#654) [67b869d]
146
147## 1.27.5
148
149### Maintenance
150- Bump github.com/onsi/ginkgo/v2 from 2.9.1 to 2.9.2 (#653) [a215021]
151- Bump github.com/go-task/slim-sprig (#652) [a26fed8]
152
153## 1.27.4
154
155### Fixes
156- improve error formatting and remove duplication of error message in Eventually/Consistently [854f075]
157
158### Maintenance
159- Bump github.com/onsi/ginkgo/v2 from 2.9.0 to 2.9.1 (#650) [ccebd9b]
160
161## 1.27.3
162
163### Fixes
164- format.Object now always includes err.Error() when passed an error [86d97ef]
165- Fix HaveExactElements to work inside ContainElement or other collection matchers (#648) [636757e]
166
167### Maintenance
168- Bump github.com/golang/protobuf from 1.5.2 to 1.5.3 (#649) [cc16689]
169- Bump github.com/onsi/ginkgo/v2 from 2.8.4 to 2.9.0 (#646) [e783366]
170
171## 1.27.2
172
173### Fixes
174- improve poll progress message when polling a consistently that has been passing [28a319b]
175
176### Maintenance
177- bump ginkgo
178- remove tools.go hack as Ginkgo 2.8.2 automatically pulls in the cli dependencies [81443b3]
179
180## 1.27.1
181
182### Maintenance
183
184- Bump golang.org/x/net from 0.6.0 to 0.7.0 (#640) [bc686cd]
185
186## 1.27.0
187
188### Features
189- Add HaveExactElements matcher (#634) [9d50783]
190- update Gomega docs to discuss GinkgoHelper() [be32774]
191
192### Maintenance
193- Bump github.com/onsi/ginkgo/v2 from 2.8.0 to 2.8.1 (#639) [296a68b]
194- Bump golang.org/x/net from 0.5.0 to 0.6.0 (#638) [c2b098b]
195- Bump github-pages from 227 to 228 in /docs (#636) [a9069ab]
196- test: update matrix for Go 1.20 (#635) [6bd25c8]
197- Bump github.com/onsi/ginkgo/v2 from 2.7.0 to 2.8.0 (#631) [5445f8b]
198- Bump webrick from 1.7.0 to 1.8.1 in /docs (#630) [03e93bb]
199- codeql: add ruby language (#626) [63c7d21]
200- dependabot: add bundler package-ecosystem for docs (#625) [d92f963]
201
202## 1.26.0
203
204### Features
205- When a polled function returns an error, keep track of the actual and report on the matcher state of the last non-errored actual [21f3090]
206- improve eventually failure message output [c530fb3]
207
208### Fixes
209- fix several documentation spelling issues [e2eff1f]
210
211
212## 1.25.0
213
214### Features
215- add `MustPassRepeatedly(int)` to asyncAssertion (#619) [4509f72]
216- compare unwrapped errors using DeepEqual (#617) [aaeaa5d]
217
218### Maintenance
219- Bump golang.org/x/net from 0.4.0 to 0.5.0 (#614) [c7cfea4]
220- Bump github.com/onsi/ginkgo/v2 from 2.6.1 to 2.7.0 (#615) [71b8adb]
221- Docs: Fix typo "MUltiple" -> "Multiple" (#616) [9351dda]
222- clean up go.sum [cd1dc1d]
223
224## 1.24.2
225
226### Fixes
227- Correctly handle assertion failure panics for eventually/consistnetly "g Gomega"s in a goroutine [78f1660]
228- docs:Fix typo "you an" -> "you can" (#607) [3187c1f]
229- fixes issue #600 (#606) [808d192]
230
231### Maintenance
232- Bump golang.org/x/net from 0.2.0 to 0.4.0 (#611) [6ebc0bf]
233- Bump nokogiri from 1.13.9 to 1.13.10 in /docs (#612) [258cfc8]
234- Bump github.com/onsi/ginkgo/v2 from 2.5.0 to 2.5.1 (#609) [e6c3eb9]
235
236## 1.24.1
237
238### Fixes
239- maintain backward compatibility for Eventually and Consisntetly's signatures [4c7df5e]
240- fix small typo (#601) [ea0ebe6]
241
242### Maintenance
243- Bump golang.org/x/net from 0.1.0 to 0.2.0 (#603) [1ba8372]
244- Bump github.com/onsi/ginkgo/v2 from 2.4.0 to 2.5.0 (#602) [f9426cb]
245- fix label-filter in test.yml [d795db6]
246- stop running flakey tests and rely on external network dependencies in CI [7133290]
247
248## 1.24.0
249
250### Features
251
252Introducting [gcustom](https://onsi.github.io/gomega/#gcustom-a-convenient-mechanism-for-buildling-custom-matchers) - a convenient mechanism for building custom matchers.
253
254This is an RC release for `gcustom`. The external API may be tweaked in response to feedback however it is expected to remain mostly stable.
255
256### Maintenance
257
258- Update BeComparableTo documentation [756eaa0]
259
260## 1.23.0
261
262### Features
263- Custom formatting on a per-type basis can be provided using `format.RegisterCustomFormatter()` -- see the docs [here](https://onsi.github.io/gomega/#adjusting-output)
264
265- Substantial improvement have been made to `StopTrying()`:
266 - Users can now use `StopTrying().Wrap(err)` to wrap errors and `StopTrying().Attach(description, object)` to attach arbitrary objects to the `StopTrying()` error
267 - `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.
268 - `StopTrying()` and `StopTrying().Now()` can both be used in matchers - not just polled functions.
269
270- `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.
271
272- `ctx` can now be passed-in as the first argument to `Eventually` and `Consistently`.
273
274## Maintenance
275
276- Bump github.com/onsi/ginkgo/v2 from 2.3.0 to 2.3.1 (#597) [afed901]
277- Bump nokogiri from 1.13.8 to 1.13.9 in /docs (#599) [7c691b3]
278- Bump github.com/google/go-cmp from 0.5.8 to 0.5.9 (#587) [ff22665]
279
280## 1.22.1
281
282## Fixes
283- When passed a context and no explicit timeout, Eventually will only timeout when the context is cancelled [e5105cf]
284- Allow StopTrying() to be wrapped [bf3cba9]
285
286## Maintenance
287- bump to ginkgo v2.3.0 [c5d5c39]
288
289## 1.22.0
290
291### Features
292
293Several improvements have been made to `Eventually` and `Consistently` in this and the most recent releases:
294
295- Eventually and Consistently can take a context.Context [65c01bc]
296 This enables integration with Ginkgo 2.3.0's interruptible nodes and node timeouts.
297- Eventually and Consistently that are passed a SpecContext can provide reports when an interrupt occurs [0d063c9]
298- Eventually/Consistently will forward an attached context to functions that ask for one [e2091c5]
299- Eventually/Consistently supports passing arguments to functions via WithArguments() [a2dc7c3]
300- Eventually and Consistently can now be stopped early with StopTrying(message) and StopTrying(message).Now() [52976bb]
301
302These improvements are all documented in [Gomega's docs](https://onsi.github.io/gomega/#making-asynchronous-assertions)
303
304## Fixes
305
306## Maintenance
307
308## 1.21.1
309
310### Features
311- Eventually and Consistently that are passed a SpecContext can provide reports when an interrupt occurs [0d063c9]
312
313## 1.21.0
314
315### Features
316- Eventually and Consistently can take a context.Context [65c01bc]
317 This enables integration with Ginkgo 2.3.0's interruptible nodes and node timeouts.
318- Introduces Eventually.Within.ProbeEvery with tests and documentation (#591) [f633800]
319- New BeKeyOf matcher with documentation and unit tests (#590) [fb586b3]
320
321## Fixes
322- Cover the entire gmeasure suite with leak detection [8c54344]
323- Fix gmeasure leak [119d4ce]
324- Ignore new Ginkgo ProgressSignal goroutine in gleak [ba548e2]
325
326## Maintenance
327
328- Fixes crashes on newer Ruby 3 installations by upgrading github-pages gem dependency (#596) [12469a0]
329
330
331## 1.20.2
332
333## Fixes
334- label specs that rely on remote access; bump timeout on short-circuit test to make it less flaky [35eeadf]
335- gexec: allow more headroom for SIGABRT-related unit tests (#581) [5b78f40]
336- Enable reading from a closed gbytes.Buffer (#575) [061fd26]
337
338## Maintenance
339- Bump github.com/onsi/ginkgo/v2 from 2.1.5 to 2.1.6 (#583) [55d895b]
340- Bump github.com/onsi/ginkgo/v2 from 2.1.4 to 2.1.5 (#582) [346de7c]
341
342## 1.20.1
343
344## Fixes
345- fix false positive gleaks when using ginkgo -p (#577) [cb46517]
346- Fix typos in gomega_dsl.go (#569) [5f71ed2]
347- don't panic on Eventually(nil), fixing #555 (#567) [9d1186f]
348- vet optional description args in assertions, fixing #560 (#566) [8e37808]
349
350## Maintenance
351- test: add new Go 1.19 to test matrix (#571) [40d7efe]
352- Bump tzinfo from 1.2.9 to 1.2.10 in /docs (#564) [5f26371]
353
354## 1.20.0
355
356## Features
357- New [`gleak`](https://onsi.github.io/gomega/#codegleakcode-finding-leaked-goroutines) experimental goroutine leak detection package! (#538) [85ba7bc]
358- New `BeComparableTo` matcher(#546) that uses `gocmp` to make comparisons [e77ea75]
359- New `HaveExistingField` matcher (#553) [fd130e1]
360- Document how to wrap Gomega (#539) [56714a4]
361
362## Fixes
363- Support pointer receivers in HaveField; fixes #543 (#544) [8dab36e]
364
365## Maintenance
366- Bump various dependencies:
367 - Upgrade to yaml.v3 (#556) [f5a83b1]
368 - Bump github/codeql-action from 1 to 2 (#549) [52f5adf]
369 - Bump github.com/google/go-cmp from 0.5.7 to 0.5.8 (#551) [5f3942d]
370 - Bump nokogiri from 1.13.4 to 1.13.6 in /docs (#554) [eb4b4c2]
371 - Use latest ginkgo (#535) [1c29028]
372 - Bump nokogiri from 1.13.3 to 1.13.4 in /docs (#541) [1ce84d5]
373 - Bump actions/setup-go from 2 to 3 (#540) [755485e]
374 - Bump nokogiri from 1.12.5 to 1.13.3 in /docs (#522) [4fbb0dc]
375 - Bump actions/checkout from 2 to 3 (#526) [ac49202]
376
377## 1.19.0
378
379## Features
380- New [`HaveEach`](https://onsi.github.io/gomega/#haveeachelement-interface) matcher to ensure that each and every element in an `array`, `slice`, or `map` satisfies the passed in matcher. (#523) [9fc2ae2] (#524) [c8ba582]
381- Users can now wrap the `Gomega` interface to implement custom behavior on each assertion. (#521) [1f2e714]
382- [`ContainElement`](https://onsi.github.io/gomega/#containelementelement-interface) 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]
383
384## Fixes
385- update RELEASING instructions to match ginkgo [0917cde]
386- Bump github.com/onsi/ginkgo/v2 from 2.0.0 to 2.1.3 (#519) [49ab4b0]
387- Fix CVE-2021-38561 (#534) [f1b4456]
388- Fix max number of samples in experiments on non-64-bit systems. (#528) [1c84497]
389- Remove dependency on ginkgo v1.16.4 (#530) [4dea8d5]
390- Fix for Go 1.18 (#532) [56d2a29]
391- Document precendence of timeouts (#533) [b607941]
392
393## 1.18.1
394
395## Fixes
396- Add pointer support to HaveField matcher (#495) [79e41a3]
397
398## 1.18.0
399
400## Features
401- Docs now live on the master branch in the docs folder which will make for easier PRs. The docs also use Ginkgo 2.0's new docs html/css/js. [2570272]
402- New HaveValue matcher can handle actuals that are either values (in which case they are passed on unscathed) or pointers (in which case they are indirected). [Docs here.](https://onsi.github.io/gomega/#working-with-values) (#485) [bdc087c]
403- Gmeasure has been declared GA [360db9d]
404
405## Fixes
406- Gomega now uses ioutil for Go 1.15 and lower (#492) - official support is only for the most recent two major versions of Go but this will unblock users who need to stay on older unsupported versions of Go. [c29c1c0]
407
408## Maintenace
409- Remove Travis workflow (#491) [72e6040]
410- Upgrade to Ginkgo 2.0.0 GA [f383637]
411- chore: fix description of HaveField matcher (#487) [2b4b2c0]
412- use tools.go to ensure Ginkgo cli dependencies are included [f58a52b]
413- remove dockerfile and simplify github actions to match ginkgo's actions [3f8160d]
414
415## 1.17.0
416
417### Features
418- Add HaveField matcher [3a26311]
419- add Error() assertions on the final error value of multi-return values (#480) [2f96943]
420- separate out offsets and timeouts (#478) [18a4723]
421- fix transformation error reporting (#479) [e001fab]
422- allow transform functions to report errors (#472) [bf93408]
423
424### Fixes
425Stop using deprecated ioutil package (#467) [07f405d]
426
427## 1.16.0
428
429### Features
430- feat: HaveHTTPStatus multiple expected values (#465) [aa69f1b]
431- feat: HaveHTTPHeaderWithValue() matcher (#463) [dd83a96]
432- feat: HaveHTTPBody matcher (#462) [504e1f2]
433- feat: formatter for HTTP responses (#461) [e5b3157]
434
435## 1.15.0
436
437### Fixes
438The previous version (1.14.0) introduced a change to allow `Eventually` and `Consistently` to support functions that make assertions. This was accomplished by overriding the global fail handler when running the callbacks passed to `Eventually/Consistently` in order to capture any resulting errors. Issue #457 uncovered a flaw with this approach: when multiple `Eventually`s are running concurrently they race when overriding the singleton global fail handler.
439
4401.15.0 resolves this by requiring users who want to make assertions in `Eventually/Consistently` call backs to explicitly pass in a function that takes a `Gomega` as an argument. The passed-in `Gomega` instance can be used to make assertions. Any failures will cause `Eventually` to retry the callback. This cleaner interface avoids the issue of swapping out globals but comes at the cost of changing the contract introduced in v1.14.0. As such 1.15.0 introduces a breaking change with respect to 1.14.0 - however we expect that adoption of this feature in 1.14.0 remains limited.
441
442In addition, 1.15.0 cleans up some of Gomega's internals. Most users shouldn't notice any differences stemming from the refactoring that was made.
443
444## 1.14.0
445
446### Features
447- gmeasure.SamplingConfig now suppers a MinSamplingInterval [e94dbca]
448- Eventually and Consistently support functions that make assertions [2f04e6e]
449 - Eventually and Consistently now allow their passed-in functions to make assertions.
450 These assertions must pass or the function is considered to have failed and is retried.
451 - Eventually and Consistently can now take functions with no return values. These implicitly return nil
452 if they contain no failed assertion. Otherwise they return an error wrapping the first assertion failure. This allows
453 these functions to be used with the Succeed() matcher.
454 - Introduce InterceptGomegaFailure - an analogue to InterceptGomegaFailures - that captures the first assertion failure
455 and halts execution in its passed-in callback.
456
457### Fixes
458- Call Verify GHTTPWithGomega receiver funcs (#454) [496e6fd]
459- Build a binary with an expected name (#446) [7356360]
460
461## 1.13.0
462
463### Features
464- gmeasure provides BETA support for benchmarking (#447) [8f2dfbf]
465- Set consistently and eventually defaults on init (#443) [12eb778]
466
467## 1.12.0
468
469### Features
470- Add Satisfy() matcher (#437) [c548f31]
471- tweak truncation message [3360b8c]
472- Add format.GomegaStringer (#427) [cc80b6f]
473- Add Clear() method to gbytes.Buffer [c3c0920]
474
475### Fixes
476- Fix error message in BeNumericallyMatcher (#432) [09c074a]
477- Bump github.com/onsi/ginkgo from 1.12.1 to 1.16.2 (#442) [e5f6ea0]
478- Bump github.com/golang/protobuf from 1.4.3 to 1.5.2 (#431) [adae3bf]
479- Bump golang.org/x/net (#441) [3275b35]
480
481## 1.11.0
482
483### Features
484- feature: add index to gstruct element func (#419) [334e00d]
485- feat(gexec) Add CompileTest functions. Close #410 (#411) [47c613f]
486
487### Fixes
488- Check more carefully for nils in WithTransform (#423) [3c60a15]
489- fix: typo in Makefile [b82522a]
490- Allow WithTransform function to accept a nil value (#422) [b75d2f2]
491- fix: print value type for interface{} containers (#409) [f08e2dc]
492- fix(BeElementOf): consistently flatten expected values [1fa9468]
493
494## 1.10.5
495
496### Fixes
497- fix: collections matchers should display type of expectation (#408) [6b4eb5a]
498- fix(ContainElements): consistently flatten expected values [073b880]
499- fix(ConsistOf): consistently flatten expected values [7266efe]
500
501## 1.10.4
502
503### Fixes
504- update golang net library to more recent version without vulnerability (#406) [817a8b9]
505- Correct spelling: alloted -> allotted (#403) [0bae715]
506- fix a panic in MessageWithDiff with long message (#402) [ea06b9b]
507
508## 1.10.3
509
510### Fixes
511- updates golang/x/net to fix vulnerability detected by snyk (#394) [c479356]
512
513## 1.10.2
514
515### Fixes
516- Add ExpectWithOffset, EventuallyWithOffset and ConsistentlyWithOffset to WithT (#391) [990941a]
517
518## 1.10.1
519
520### Fixes
521- Update dependencies (#389) [9f5eecd]
522
523## 1.10.0
524
525### Features
526- Add HaveHTTPStatusMatcher (#378) [f335c94]
527- Changed matcher for content-type in VerifyJSONRepresenting (#377) [6024f5b]
528- Make ghttp usable with x-unit style tests (#376) [c0be499]
529- Implement PanicWith matcher (#381) [f8032b4]
530
531## 1.9.0
532
533### Features
534- Add ContainElements matcher (#370) [2f57380]
535- Output missing and extra elements in ConsistOf failure message [a31eda7]
536- Document method LargestMatching [7c5a280]
537
538## 1.8.1
539
540### Fixes
541- Fix unexpected MatchError() behaviour (#375) [8ae7b2f]
542
543## 1.8.0
544
545### Features
546- Allow optional description to be lazily evaluated function (#364) [bf64010]
547- Support wrapped errors (#359) [0a981cb]
548
549## 1.7.1
550
551### Fixes
552- Bump go-yaml version to cover fixed ddos heuristic (#362) [95e431e]
553
554## 1.7.0
555
556### Features
557- export format property variables (#347) [642e5ba]
558
559### Fixes
560- minor fix in the documentation of ExpectWithOffset (#358) [beea727]
561
562## 1.6.0
563
564### Features
565
566- Display special chars on error [41e1b26]
567- Add BeElementOf matcher [6a48b48]
568
569### Fixes
570
571- Remove duplication in XML matcher tests [cc1a6cb]
572- Remove unnecessary conversions (#357) [7bf756a]
573- Fixed import order (#353) [2e3b965]
574- Added missing error handling in test (#355) [c98d3eb]
575- Simplify code (#356) [0001ed9]
576- Simplify code (#354) [0d9100e]
577- Fixed typos (#352) [3f647c4]
578- Add failure message tests to BeElementOf matcher [efe19c3]
579- Update go-testcov untested sections [37ee382]
580- Mark all uncovered files so go-testcov ./... works [53b150e]
581- Reenable gotip in travis [5c249dc]
582- Fix the typo of comment (#345) [f0e010e]
583- Optimize contain_element_matcher [abeb93d]
584
585
586## 1.5.0
587
588### Features
589
590- Added MatchKeys matchers [8b909fc]
591
592### Fixes and Minor Improvements
593
594- Add type aliases to remove stuttering [03b0461]
595- Don't run session_test.go on windows (#324) [5533ce8]
596
597## 1.4.3
598
599### Fixes:
600
601- ensure file name and line numbers are correctly reported for XUnit [6fff58f]
602- Fixed matcher for content-type (#305) [69d9b43]
603
604## 1.4.2
605
606### Fixes:
607
608- Add go.mod and go.sum files to define the gomega go module [f3de367, a085d30]
609- Work around go vet issue with Go v1.11 (#300) [40dd6ad]
610- Better output when using with go XUnit-style tests, fixes #255 (#297) [29a4b97]
611- Fix MatchJSON fail to parse json.RawMessage (#298) [ae19f1b]
612- show threshold in failure message of BeNumericallyMatcher (#293) [4bbecc8]
613
614## 1.4.1
615
616### Fixes:
617
618- Update documentation formatting and examples (#289) [9be8410]
619- allow 'Receive' matcher to be used with concrete types (#286) [41673fd]
620- Fix data race in ghttp server (#283) [7ac6b01]
621- Travis badge should only show master [cc102ab]
622
623## 1.4.0
624
625### Features
626- Make string pretty diff user configurable (#273) [eb112ce, 649b44d]
627
628### Fixes
629- Use httputil.DumpRequest to pretty-print unhandled requests (#278) [a4ff0fc, b7d1a52]
630- fix typo floa32 > float32 (#272) [041ae3b, 6e33911]
631- Fix link to documentation on adding your own matchers (#270) [bb2c830, fcebc62]
632- Use setters and getters to avoid race condition (#262) [13057c3, a9c79f1]
633- Avoid sending a signal if the process is not alive (#259) [b8043e5, 4fc1762]
634- Improve message from AssignableToTypeOf when expected value is nil (#281) [9c1fb20]
635
636## 1.3.0
637
638Improvements:
639
640- The `Equal` matcher matches byte slices more performantly.
641- Improved how `MatchError` matches error strings.
642- `MatchXML` ignores the order of xml node attributes.
643- Improve support for XUnit style golang tests. ([#254](https://github.com/onsi/gomega/issues/254))
644
645Bug Fixes:
646
647- Diff generation now handles multi-byte sequences correctly.
648- Multiple goroutines can now call `gexec.Build` concurrently.
649
650## 1.2.0
651
652Improvements:
653
654- Added `BeSent` which attempts to send a value down a channel and fails if the attempt blocks. Can be paired with `Eventually` to safely send a value down a channel with a timeout.
655- `Ω`, `Expect`, `Eventually`, and `Consistently` now immediately `panic` if there is no registered fail handler. This is always a mistake that can hide failing tests.
656- `Receive()` no longer errors when passed a closed channel, it's perfectly fine to attempt to read from a closed channel so Ω(c).Should(Receive()) always fails and Ω(c).ShoudlNot(Receive()) always passes with a closed channel.
657- Added `HavePrefix` and `HaveSuffix` matchers.
658- `ghttp` can now handle concurrent requests.
659- Added `Succeed` which allows one to write `Ω(MyFunction()).Should(Succeed())`.
660- Improved `ghttp`'s behavior around failing assertions and panics:
661 - If a registered handler makes a failing assertion `ghttp` will return `500`.
662 - If a registered handler panics, `ghttp` will return `500` *and* fail the test. This is new behavior that may cause existing code to break. This code is almost certainly incorrect and creating a false positive.
663- `ghttp` servers can take an `io.Writer`. `ghttp` will write a line to the writer when each request arrives.
664- Added `WithTransform` matcher to allow munging input data before feeding into the relevant matcher
665- Added boolean `And`, `Or`, and `Not` matchers to allow creating composite matchers
666- Added `gbytes.TimeoutCloser`, `gbytes.TimeoutReader`, and `gbytes.TimeoutWriter` - these are convenience wrappers that timeout if the underlying Closer/Reader/Writer does not return within the alloted time.
667- Added `gbytes.BufferReader` - this constructs a `gbytes.Buffer` that asynchronously reads the passed-in `io.Reader` into its buffer.
668
669Bug Fixes:
670- gexec: `session.Wait` now uses `EventuallyWithOffset` to get the right line number in the failure.
671- `ContainElement` no longer bails if a passed-in matcher errors.
672
673## 1.0 (8/2/2014)
674
675No changes. Dropping "beta" from the version number.
676
677## 1.0.0-beta (7/8/2014)
678Breaking Changes:
679
680- Changed OmegaMatcher interface. Instead of having `Match` return failure messages, two new methods `FailureMessage` and `NegatedFailureMessage` are called instead.
681- Moved and renamed OmegaFailHandler to types.GomegaFailHandler and OmegaMatcher to types.GomegaMatcher. Any references to OmegaMatcher in any custom matchers will need to be changed to point to types.GomegaMatcher
682
683New Test-Support Features:
684
685- `ghttp`: supports testing http clients
686 - Provides a flexible fake http server
687 - Provides a collection of chainable http handlers that perform assertions.
688- `gbytes`: supports making ordered assertions against streams of data
689 - Provides a `gbytes.Buffer`
690 - Provides a `Say` matcher to perform ordered assertions against output data
691- `gexec`: supports testing external processes
692 - Provides support for building Go binaries
693 - Wraps and starts `exec.Cmd` commands
694 - Makes it easy to assert against stdout and stderr
695 - Makes it easy to send signals and wait for processes to exit
696 - Provides an `Exit` matcher to assert against exit code.
697
698DSL Changes:
699
700- `Eventually` and `Consistently` can accept `time.Duration` interval and polling inputs.
701- The default timeouts for `Eventually` and `Consistently` are now configurable.
702
703New Matchers:
704
705- `ConsistOf`: order-independent assertion against the elements of an array/slice or keys of a map.
706- `BeTemporally`: like `BeNumerically` but for `time.Time`
707- `HaveKeyWithValue`: asserts a map has a given key with the given value.
708
709Updated Matchers:
710
711- `Receive` matcher can take a matcher as an argument and passes only if the channel under test receives an objet that satisfies the passed-in matcher.
712- Matchers that implement `MatchMayChangeInTheFuture(actual interface{}) bool` can inform `Eventually` and/or `Consistently` when a match has no chance of changing status in the future. For example, `Receive` returns `false` when a channel is closed.
713
714Misc:
715
716- Start using semantic versioning
717- Start maintaining changelog
718
719Major refactor:
720
721- Pull out Gomega's internal to `internal`
View as plain text