Support null vs noop comparison.

This commit is contained in:
Tom Alexander 2023-12-30 20:47:17 -05:00
parent aa5629354e
commit d258cdb839
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -156,6 +156,9 @@ fn compare_optional_json_value<'b, 's>(
(None, None) | (None, Some(serde_json::Value::Null)) | (Some(Token::Atom("nil")), None) => { (None, None) | (None, Some(serde_json::Value::Null)) | (Some(Token::Atom("nil")), None) => {
Ok(WasmDiffResult::default()) Ok(WasmDiffResult::default())
} }
(None, Some(serde_json::Value::Object(w))) if w.contains_key("noop") => {
Ok(WasmDiffResult::default())
}
(Some(e), Some(w)) => compare_json_value(source, e, w), (Some(e), Some(w)) => compare_json_value(source, e, w),
_ => Ok(WasmDiffResult { _ => Ok(WasmDiffResult {
status: vec![WasmDiffStatus::Bad( status: vec![WasmDiffStatus::Bad(