From 85c14e596668315cf01f0366d1fa941d3b4947c9 Mon Sep 17 00:00:00 2001 From: c9s Date: Sun, 2 Jan 2022 02:44:47 +0800 Subject: [PATCH] binance: fix parser tests --- pkg/exchange/binance/parse_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/exchange/binance/parse_test.go b/pkg/exchange/binance/parse_test.go index 50df21d55..877c4132a 100644 --- a/pkg/exchange/binance/parse_test.go +++ b/pkg/exchange/binance/parse_test.go @@ -127,7 +127,7 @@ func TestMarginResponseParsing(t *testing.T) { for _, testcase := range testcases { payload := testcase.input payload = jsCommentTrimmer.ReplaceAllLiteralString(payload, "") - event, err := parseWebSocketEvent(payload) + event, err := parseWebSocketEvent([]byte(payload)) assert.NoError(t, err) assert.NotNil(t, event) } @@ -171,7 +171,7 @@ func TestParseOrderUpdate(t *testing.T) { payload = jsCommentTrimmer.ReplaceAllLiteralString(payload, "") - event, err := parseWebSocketEvent(payload) + event, err := parseWebSocketEvent([]byte(payload)) assert.NoError(t, err) assert.NotNil(t, event) @@ -333,7 +333,7 @@ func TestFuturesResponseParsing(t *testing.T) { for _, testcase := range testcases { payload := testcase.input payload = jsCommentTrimmer.ReplaceAllLiteralString(payload, "") - event, err := parseWebSocketEvent(payload) + event, err := parseWebSocketEvent([]byte(payload)) assert.NoError(t, err) assert.NotNil(t, event) } @@ -381,7 +381,7 @@ func TestParseOrderFuturesUpdate(t *testing.T) { payload = jsCommentTrimmer.ReplaceAllLiteralString(payload, "") - event, err := parseWebSocketEvent(payload) + event, err := parseWebSocketEvent([]byte(payload)) assert.NoError(t, err) assert.NotNil(t, event)