MCPcopy
hub / github.com/gofiber/fiber / Test_New_With_Client

Function Test_New_With_Client

client/client_test.go:62–83  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

60}
61
62func Test_New_With_Client(t *testing.T) {
63 t.Parallel()
64
65 t.Run("with valid client", func(t *testing.T) {
66 t.Parallel()
67
68 c := &fasthttp.Client{
69 MaxConnsPerHost: 5,
70 }
71 client := NewWithClient(c)
72
73 require.NotNil(t, client)
74 })
75
76 t.Run("with nil client", func(t *testing.T) {
77 t.Parallel()
78
79 require.PanicsWithValue(t, "fasthttp.Client must not be nil", func() {
80 NewWithClient(nil)
81 })
82 })
83}
84
85func Test_New_With_HostClient(t *testing.T) {
86 t.Parallel()

Callers

nothing calls this directly

Calls 1

NewWithClientFunction · 0.85

Tested by

no test coverage detected