Skip to main content
All failure patterns
Assertion mismatchJest · Playwright · pytest

Expected and received values differ

The observed application result does not match the contract encoded in the assertion.

RECOGNIZABLE ERROR

Expected: value Received: other-value

RANKED DIAGNOSIS

What usually causes it

  1. 01

    The product behavior regressed

    The implementation now returns or renders a value outside the intended contract.

    DIAGNOSE

    Reproduce through the public behavior and compare with the requirement or API contract.

    FIX

    Repair the product and keep the assertion as the regression guard.

  2. 02

    The assertion encodes stale behavior

    A deliberate contract change may not have updated the test.

    DIAGNOSE

    Review the approved change and confirm which behavior is authoritative.

    FIX

    Update the test only when the contract change is explicit and reviewed.

  3. 03

    Uncontrolled state changed the result

    Time, locale, random values, or shared records can make the observation vary.

    DIAGNOSE

    Repeat with controlled inputs and inspect state boundaries.

    FIX

    Control the source of variation and assert the meaningful contract.

Prevent the repeat

  • Tie assertions to reviewed contracts.
  • Control time, locale, and random sources.
  • Keep failure diffs focused.

Primary references

Run this against your evidence

The browser triage workflow uses the same stable pattern slug and does not upload your paste.

Open local triage

Related failure patterns