Closed gavv closed 1 year ago
After introducing new chain.assert() method, we can simplify many websocket tests.
In websocket_test.go, find all table-driven tests that have assertOk field and refactor them as follows:
websocket_test.go
assertOk
assertOk bool
result chainResult
assertOk: true
result: success
assertOk: false
result: failure
instead of:
if tc.assertOk { ws.chain.assert(t, success) } else { ws.chain.assert(t, failure) }
use:
ws.chain.assert(t, tc.result)
@gavv i'd like to claim this issue!
@antara-gandhi welcome :)
After introducing new chain.assert() method, we can simplify many websocket tests.
In
websocket_test.go
, find all table-driven tests that haveassertOk
field and refactor them as follows:assertOk bool
withresult chainResult
assertOk: true
, useresult: success
assertOk: false
, useresult: failure
instead of:
use: