(t *testing.T, opts *testOptions)
| 562 | testException(t, &testOptions{workerScript: "exception.php"}) |
| 563 | } |
| 564 | func testException(t *testing.T, opts *testOptions) { |
| 565 | runTest(t, func(handler func(http.ResponseWriter, *http.Request), _ *httptest.Server, i int) { |
| 566 | body, _ := testGet(fmt.Sprintf("http://example.com/exception.php?i=%d", i), handler, t) |
| 567 | |
| 568 | assert.Contains(t, body, "hello") |
| 569 | assert.Contains(t, body, fmt.Sprintf(`Uncaught Exception: request %d`, i)) |
| 570 | }, opts) |
| 571 | } |
| 572 | |
| 573 | func TestEarlyHints_module(t *testing.T) { testEarlyHints(t, &testOptions{}) } |
| 574 | func TestEarlyHints_worker(t *testing.T) { |
no test coverage detected