Tim Vahlbrock
10/08/2024, 8:23 AMoptional
that wraps around the matcher for the non-null value. The testing framework could then be modified to execute the test twice. Using some global state, the optional
matcher would one time then provide the non null matcher and one time the nullish matcher or none at all. I was also thinking about using the test data builder pattern on the provider side, which might make it possible to use a similar approach on the provider side to generate Dto instances with either all values, or just the required ones. Is this approach in general in line with Pacts ideas and principles?Tim Vahlbrock
10/08/2024, 2:47 PMoptional
matcher with Pact JS, seems to be working quite well. Encountered that either the request or the state name needs to differ to include both interactions in the contract. Different state params are not sufficient. Problem is reported, but this might be intended.Boris
11/08/2024, 4:26 AMTim Vahlbrock
11/11/2024, 7:34 AMoptional
switch is actually used on nullable fields without a linter or something similar), but at least it confronts the person writing the provider contract tests with the decision, whether a field should be nullable or not.Boris
11/11/2024, 10:50 AMBoris
11/11/2024, 10:51 AMTim Vahlbrock
11/11/2024, 12:06 PMBoris
11/11/2024, 12:11 PMcan-i-deploy
should fail. There are a few different approaches for dealing with that scenario, including pending & WIP pacts, and there was some discussion recently about a feature flag facility.