Skip to main content

create_err_diff

Function create_err_diff 

Source
pub fn create_err_diff(
    actual: &Value,
    expected: &Value,
    operator: &str,
    custom_message: Option<&str>,
) -> String
Expand description

Build the whole AssertionError message for the comparisons that carry a diff (strictEqual, deepStrictEqual, partialDeepStrictEqual).

A custom message replaces only the HEADING; Node still appends the diff, so assert.deepStrictEqual(a, b, 'boom') reports boom followed by the same + actual - expected body a generated message would carry.