We are starting to look into react module federati...
# general
j
We are starting to look into react module federation. Has anyone heard of anyone using consumer driven contract testing with this? It sounds like the use case would apply.
b
Could you elaborate on how you think that would work? I don’t think I understand module federation enough but at first glance it seems like it’s a way to load JS modules ‘on demand’, and my brain has a hard time matching that with how I understand contract testing, i.e., as a means of verifying that messages exchanged between a consumer and a provider can be consumed / produced. I can see the consumer and provider in this case, but what would the messages / data be? This isn’t criticism, this is me not understanding your case ;)
j
It's a module so it'll have public interfaces that hosts access to send and receive data by calling functions. It sounds a bit like unit testing. But the federated modules are generally in seperate repositories and deployed seperately, so having a host app (consumer) write tests would be useful.
b
Gotcha. Interesting use case. No idea how easy or hard it would be to write an adapter for Pact for this as we might be dealing with potentially complex objects that are passed to / from these modules rather than simple JSON / XML values