| Conditions | 4 |
| Total Lines | 18 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package helpers |
||
| 23 | // AssertObjectEqualsJSON checks if the JSON representation of an object matches the expected value |
||
| 24 | func AssertObjectEqualsJSON(t *testing.T, expectedJSON []byte, actual any) { |
||
| 25 | actualJSON, err := json.Marshal(actual) |
||
| 26 | assert.Nil(t, err) |
||
| 27 | assert.JSONEq(t, string(expectedJSON), string(actualJSON)) |
||
| 28 | } |
||
| 29 |