Repository: vapor/vapor
File: Sources/Testing/Response.swift (Swift)

Code before:
        equals value: NodeRepresentable?,
        file: StaticString = #file,
        line: UInt = #line
    ) throws -> Response {
        let desired = try value?.makeNode(in: nil).wrapped ?? StructuredData.null
        
        return try assertJSON(
            key,
            file: file,
            line: line,
            errorReason: "does not equal '\(desired)'"
        ) { json in
            return json.wrapped == desired
        }
    }
    
    /// Asserts the response body contains a
    /// desired byte array.
    @discardableResult
    public func assertJSON(
        _ key: String,
        notEquals value: NodeRepresentable?,
        file: StaticString = #file,
        line: UInt = #line
    ) throws -> Response {
        let desired = try value?.makeNode(in: nil).wrapped ?? StructuredData.null
        
        return try assertJSON(
            key,
            file: file,
            line: line,
            errorReason: "does equal '\(desired)'"
        ) { json in
            return json.wrapped != desired
        }
    }
    
    /// Asserts the response body contains a
    /// desired byte array.
    @discardableResult
    public func assertJSON(
        _ key: String,
        fuzzyEquals value: NodeRepresentable?,
        file: StaticString = #file,
        line: UInt = #line
    ) throws -> Response {
        let desired = try value?.makeNode(in: nil).wrapped ?? StructuredData.null
        
        return try assertJSON(
            key,
            file: file,

Review comment (suggestion):
We should be able to do `try value.makeNode(in: jsonContext).wrapped` w/o the `??`

Either way, make sure to use `jsonContext`

Also, just to stick w/ convention, we try to use `expectation` for our desired value. I know it's nitpicky, but we're trying to make our codebase a bit more cohesive where we can.

Code after:
        equals value: NodeRepresentable?,
        file: StaticString = #file,
        line: UInt = #line
    ) throws -> Response {
        let desired = try value?.makeNode(in: nil).wrapped ?? StructuredData.null
        
        return try assertJSON(
            key,
            file: file,
            line: line,
            errorReason: "does not equal '\(desired)'"
        ) { json in
            return json.wrapped == desired
        }
    }
    
    /// Asserts the response json for a key
    /// does not equal the value.
    @discardableResult
    public func assertJSON(
        _ key: String,
        notEquals value: NodeRepresentable?,
        file: StaticString = #file,
        line: UInt = #line
    ) throws -> Response {
        let expectation = try value.makeNode(in: jsonContext).wrapped
        
        return try assertJSON(
            key,
            file: file,
            line: line,
            errorReason: "does equal '\(expectation)'"
        ) { json in
            return json.wrapped != expectation
        }
    }
    
    /// Asserts the response body contains a
    /// desired byte array.
    @discardableResult
    public func assertJSON(
        _ key: String,
        fuzzyEquals value: NodeRepresentable?,
        file: StaticString = #file,
        line: UInt = #line
    ) throws -> Response {
        let desired = try value?.makeNode(in: nil).wrapped ?? StructuredData.null
        
        return try assertJSON(
            key,
            file: file,