godog/internal
John Lonergan 223efc3b14
Fix some type checks on the signatures of nested step handlers (#647)
* at some point someone changed the return type for nested steps from []string to godog.Steps but they forgot to adjust the type checks. The existing type checks were lax and unable to distinguish  []string from godog.Steps but in a couple of places in the code the value is coerced to godog.Steps and so if someone returned []string then the code would blow up. Additionally there were some tests aroudn these types but they also had not been updated but the test was passing for the wrong reason - the particular test expected an error but the cause of the error wasn't the one the code expected.

* CHANGELOG.md

* use chatgpt to regen the top of the code based on the new tests

* use chatgpt to regen the top of the code based on the new tests

* corrected the error messages of the param checks to indicate that the problem is the function signature and not the args being passed to the function, also added numerous extra assertions on the precise error messages returned. Now that the precise error is being verified in the test I have improved certain error messages to that more accurate detail is included in the errors

* added further constraints to the step arg mapping tests

* removed redundant test

* include a step error result in the reported error even when the ctx is nil
2024-10-15 13:25:13 +01:00
..
builder Update CI for go1.20 (#552) 2023-04-04 00:11:09 +02:00
flags ambiguous step def detection akin to cucumber jvm (#636) 2024-07-01 10:28:39 +01:00
formatters Fix some type checks on the signatures of nested step handlers (#647) 2024-10-15 13:25:13 +01:00
models Fix some type checks on the signatures of nested step handlers (#647) 2024-10-15 13:25:13 +01:00
parser Use fs.FS abstraction for filesystem (#550) 2023-03-27 21:52:51 +02:00
storage Use staticcheck GitHub Action (#563) 2023-06-06 16:52:06 +02:00
tags Reduce deps, fix CI for go1.16, format imports 2023-05-26 16:38:51 +02:00
testutils Reduce deps, fix CI for go1.16, format imports 2023-05-26 16:38:51 +02:00
utils Created internal packages for formatters, storage and models 2020-07-02 08:51:31 +02:00