JSONEq asserts that two JSON strings are equivalent. assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
(t TestingT, expected string, actual string, msgAndArgs ...interface{})
| 1124 | // |
| 1125 | // assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) |
| 1126 | func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) { |
| 1127 | if h, ok := t.(tHelper); ok { |
| 1128 | h.Helper() |
| 1129 | } |
| 1130 | if assert.JSONEq(t, expected, actual, msgAndArgs...) { |
| 1131 | return |
| 1132 | } |
| 1133 | t.FailNow() |
| 1134 | } |
| 1135 | |
| 1136 | // JSONEqf asserts that two JSON strings are equivalent. |
| 1137 | // |
searching dependent graphs…