(t *testing.T)
| 60 | } |
| 61 | |
| 62 | func 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 | |
| 85 | func Test_New_With_HostClient(t *testing.T) { |
| 86 | t.Parallel() |
nothing calls this directly
no test coverage detected