I'm currently starting to create some pact tests and with larger objects I see a lot of test data duplication between the body pact should return and the object I'm using as the actual value for the later assertion, especially for larger models. In
https://github.com/pact-foundation/pact-js/blob/1cbe0576bba9544e02b92f82dffccf1603254c30/examples/v3/typescript/test/user.spec.ts#L24 the same object reference is used at both locations. In practice the mocked body will still have some matchers wrapping the values, so I thought about writing an "unwrapping" function, that converts the matching object to the assertion object, but I am unsure if I that will make the tests less reliable. On the other hand, it would also enable the usage of test data builders with sane default values, which would be valuable for models used in multiple endpoints. Has anyone any experience with or ideas on this?