BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
42 / 81 · Module 13 — MUnit · filtered: interview← prev⊞ allnext →

13.14Spy

MUnit can Spy processors as well as mock them.

Conceptually, Spy lets the real component/process execute while giving you visibility around it.

Think:

jest.spyOn(...)

rather than:

jest.mock(...)

Use it when you want to observe:

payload before processor
payload after processor

without replacing the processor's behavior.