Default client function moved to client_test.go as its only used there.

This commit is contained in:
Musab Gültekin
2021-05-23 23:47:43 +03:00
parent f35d34bc02
commit 5aa2c2540e
2 changed files with 11 additions and 9 deletions

View File

@ -2,6 +2,7 @@ package client
import (
"fmt"
"github.com/chromedp/chromedp"
"github.com/stretchr/testify/assert"
"net/http"
"net/http/httptest"
@ -145,3 +146,13 @@ func TestRetry(t *testing.T) {
assert.Nil(t, res)
assert.Error(t, err)
}
// newClientDefault creates new client with default options
func newClientDefault() *Client {
return NewClient(&Options{
MaxBodySize: DefaultMaxBody,
RetryTimes: DefaultRetryTimes,
RetryHTTPCodes: DefaultRetryHTTPCodes,
AllocatorOptions: chromedp.DefaultExecAllocatorOptions[:],
})
}