fix(render): use assert.JSONEq for AsciiJSON non-BMP test

golangci-lint's testifylint rule flags comparing two JSON strings with
assert.Equal, so switch to assert.JSONEq to satisfy CI.
This commit is contained in:
ankit-songara 2026-07-17 10:19:42 +05:30
parent 6942b48b72
commit 541b0eb578

View File

@ -272,7 +272,7 @@ func TestRenderAsciiJSONNonBMP(t *testing.T) {
// U+1F600 is outside the Basic Multilingual Plane and must be encoded as
// a UTF-16 surrogate pair (RFC 8259 §7), not a single \u escape with 5+
// hex digits.
assert.Equal(t, "{\"msg\":\"\\ud83d\\ude00\"}", w.Body.String())
assert.JSONEq(t, "{\"msg\":\"\\ud83d\\ude00\"}", w.Body.String())
var decoded map[string]string
require.NoError(t, json.Unmarshal(w.Body.Bytes(), &decoded))