11 / 18 · Module 14 — External Automated Testing of Mule Integrations · filtered: cheatsheet← prev⊞ allnext →
14.12Cleanup must not hide failures
Bad:
await create();
await verify();
await delete();
If verification throws:
delete never runs
Use fixture/finally cleanup where appropriate.
Conceptually:
try {
...
} finally {
await cleanup();
}
But be cautious: when a test fails, keeping the record temporarily may help debugging.