Morton Digital

← All Products

Lua Pact Testing Debugger Toolkit

Stop wasting hours on generic pact error messages. Get copy-paste Lua functions that pinpoint exactly where your mocks diverge from actual API responses, built for Lua's type system, not generic testing advice.

2,401 words · Instant download · AI-assisted content

What's Inside

Free Preview — first chapter

Deep Diff with Path Tracking This function compares two tables recursively and returns the exact path to every divergence: ```lua function debugPactMismatch(expected, actual, path) path = path or "root" local diffs = {} if type(expected) ~= type(actual) then table.insert(diffs, { path = path, expected_type = type(expected), actual_type = type(actual), expected_value = tostring(expected), actual_value = tostring(actual) }) return diffs end if type(expected) == "table" then for key, expectedValue in pairs(expected) do -- recursive comparison logic end end return diffs end ``` Instead of "body mismatch," you get: `root.payment.metadata.status, expected type: string, got: nil`

$19.00

One-time purchase — instant download

Buy Now — $19.00

30-day money-back guarantee. If it doesn't deliver value, reply to your receipt for a full refund.

← Back to all products