Write an integration test for two modules
Writes one integration test that checks how two parts of your web app work together, using real code paths and a small set of fakes.
Task:
Write one integration test in [test framework] that checks how the two modules below work together.
Context:
The modules are [module A] and [module B] in my web app, written in [language]. The handoff between them matters because [why it matters]. The database and outside services should be faked, and the test must never contact a live third-party service.
Rules:
- Read both modules first and name, in two lines, the exact point where they hand data to each other.
- Let the two modules run for real and fake only what sits outside them.
- Test one happy path and one failure at the handoff.
- If a fake would need to behave in a way you cannot see in the code, ask me one question before writing it.
Result:
Two lines naming the handoff, then one code block with the test. Close with one sentence on what this test cannot catch.
Material:
[paste module A and module B here]