Update module github.com/maxatome/go-testdeep to v1.12.0 #15

Merged
renovate[bot] merged 1 commit from renovate/github.com-maxatome-go-testdeep-1.x into main 2022-08-18 17:47:17 +00:00
renovate[bot] commented 2022-08-07 18:54:29 +00:00 (Migrated from github.com)

Mend Renovate

This PR contains the following updates:

Package Type Update Change
github.com/maxatome/go-testdeep require minor v1.11.0 -> v1.12.0

Release Notes

maxatome/go-testdeep

v1.12.0

Compare Source

New features
  • [Struct][Struct] & [SStruct][SStruct] can override model fields in expectedFields, as in:
      td.Cmp(t, got, td.Struct(
        Person{
          Name:     "John Doe",
          Age:      23,
          Children: 4,
        },
        td.StructFields{
          "> Age":     td.Between(40, 45),
          ">Children": 0, // spaces after ">" are optional
        }),
      )
    
  • [Struct][Struct] & [SStruct][SStruct] expectedFields is now optional or multiple. If multiple, all maps are merged from left to right;
  • try to detect wrongly defined hooks in [tdsuite][tdsuite] @​deathiop
    Given the 5 hooks:
  • try to detect possible tdsuite.Run() misuse, warn the user when it is called with a non-pointer suite, and some key methods are only available via a pointer suite;
  • add tdhttp.Options function & tdhttp.TestAPI.Options method;
  • [Code][Code] can now officially delegate its comparison, using two new kinds of function:
    • func(t *td.T, arg)
    • func(assert, require *td.T, arg)
      this way the usage of [*td.T][*td.T] methods is secure. Note that these functions do not return anything;
  • using a [*td.T][*td.T] instance as Cmp* first parameter now allows to inherit its configuration.
    td.Cmp(td.Require(t), got, 42)
    
    is the same as:
    td.Require(t).Cmp(got, 42)
    
Fixes
Miscellaneous
  • enhance & refactor doc comments with new go 1.19 features;
  • documentation now uses any instead of interface{};
  • fix typos.

As usual: enjoy! :)


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Mend Renovate. View repository job log here.

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/maxatome/go-testdeep](https://togithub.com/maxatome/go-testdeep) | require | minor | `v1.11.0` -> `v1.12.0` | --- ### Release Notes <details> <summary>maxatome/go-testdeep</summary> ### [`v1.12.0`](https://togithub.com/maxatome/go-testdeep/releases/tag/v1.12.0) [Compare Source](https://togithub.com/maxatome/go-testdeep/compare/v1.11.0...v1.12.0) ##### New features - [`Struct`][Struct] & [`SStruct`][SStruct] can override model fields in *expectedFields*, as in: ```go td.Cmp(t, got, td.Struct( Person{ Name: "John Doe", Age: 23, Children: 4, }, td.StructFields{ "> Age": td.Between(40, 45), ">Children": 0, // spaces after ">" are optional }), ) ``` - [`Struct`][Struct] & [`SStruct`][SStruct] *expectedFields* is now optional or multiple. If multiple, all maps are merged from left to right; - try to detect wrongly defined hooks in [`tdsuite`][tdsuite] [@&#8203;deathiop](https://togithub.com/deathiop) Given the 5 hooks: - [`Setup`](https://pkg.go.dev/github.com/maxatome/go-testdeep/helpers/tdsuite#Setup) - [`PreTest`](https://pkg.go.dev/github.com/maxatome/go-testdeep/helpers/tdsuite#PreTest) - [`PostTest`](https://pkg.go.dev/github.com/maxatome/go-testdeep/helpers/tdsuite#PostTest) - [`BetweenTests`](https://pkg.go.dev/github.com/maxatome/go-testdeep/helpers/tdsuite#BetweenTests) - [`Destroy`](https://pkg.go.dev/github.com/maxatome/go-testdeep/helpers/tdsuite#Destroy) raise an error when a method is defined on a [`tdsuite`][tdsuite] with one of these names but without matching the proper interface; - try to detect possible [`tdsuite.Run()`](https://pkg.go.dev/github.com/maxatome/go-testdeep/helpers/tdsuite#Run) misuse, warn the user when it is called with a non-pointer suite, and some key methods are only available via a pointer suite; - add [`tdhttp.Options`](https://pkg.go.dev/github.com/maxatome/go-testdeep/helpers/tdhttp#Options) function & [`tdhttp.TestAPI.Options`](https://pkg.go.dev/github.com/maxatome/go-testdeep/helpers/tdhttp#TestAPI.Options) method; - [`Code`][Code] can now officially delegate its comparison, using two new kinds of function: - `func(t *td.T, arg)` - `func(assert, require *td.T, arg)` this way the usage of [`*td.T`][*td.T] methods is secure. Note that these functions do not return anything; - using a [`*td.T`][*td.T] instance as `Cmp*` first parameter now allows to inherit its configuration. ```go td.Cmp(td.Require(t), got, 42) ``` is the same as: ```go td.Require(t).Cmp(got, 42) ``` ##### Fixes - [`Helper()`](https://pkg.go.dev/testing#T.Helper) was not called in [`T.LogTrace`](https://pkg.go.dev/github.com/maxatome/go-testdeep/td#T.LogTrace), [`T.ErrorTrace`](https://pkg.go.dev/github.com/maxatome/go-testdeep/td#T.ErrorTrace) and [`T.FatalTrace`](https://pkg.go.dev/github.com/maxatome/go-testdeep/td#T.FatalTrace) methods. Fixed; - [`UseEqual`](https://pkg.go.dev/github.com/maxatome/go-testdeep/td#ContextConfig.UseEqual) & anchoring feature didn't play well together. Fixed; - panic when comparing nested maps using private fields as key. Fixed. ##### Miscellaneous - enhance & refactor doc comments with new go 1.19 features; - documentation now uses `any` instead of `interface{}`; - fix typos. As usual: enjoy! :) [`tdsuite`]: https://pkg.go.dev/github.com/maxatome/go-testdeep/helpers/tdsuite [`*td.T`]: https://pkg.go.dev/github.com/maxatome/go-testdeep/td#T [`Code`]: https://go-testdeep.zetta.rocks/operators/code/ [`Struct`]: https://go-testdeep.zetta.rocks/operators/struct/ [`SStruct`]: https://go-testdeep.zetta.rocks/operators/sstruct/ </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/baez90/kreaper). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4xNTAuNCIsInVwZGF0ZWRJblZlciI6IjMyLjE1NC40In0=-->
codecov-commenter commented 2022-08-07 18:56:23 +00:00 (Migrated from github.com)

Codecov Report

Merging #15 (2658214) into main (e2f5120) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #15   +/-   ##
=======================================
  Coverage   75.70%   75.70%           
=======================================
  Files           2        2           
  Lines         107      107           
=======================================
  Hits           81       81           
  Misses         19       19           
  Partials        7        7           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

# [Codecov](https://codecov.io/gh/baez90/kreaper/pull/15?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=baez90) Report > Merging [#15](https://codecov.io/gh/baez90/kreaper/pull/15?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=baez90) (2658214) into [main](https://codecov.io/gh/baez90/kreaper/commit/e2f512046e826fabd1c5788504224f2d88e4dc5c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=baez90) (e2f5120) will **not change** coverage. > The diff coverage is `n/a`. ```diff @@ Coverage Diff @@ ## main #15 +/- ## ======================================= Coverage 75.70% 75.70% ======================================= Files 2 2 Lines 107 107 ======================================= Hits 81 81 Misses 19 19 Partials 7 7 ``` Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=baez90). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=baez90)
This repo is archived. You cannot comment on pull requests.
No description provided.