Skip to content

Commit 7a38cac

Browse files
committed
Merge branch 'main' of github.com:http-tests/cache-tests
2 parents df0a10c + d2182ac commit 7a38cac

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@ To test a browser, just point it at `https://{hostname:port}/test-browser.html`
109109

110110
On OSX, you can use `test-browser.sh` to automate this.
111111

112+
## Testing Forward Proxies
113+
To test a forward proxy which listens on 127.0.0.1:8082, start the server:
114+
115+
> npm run server
116+
117+
and then run:
118+
119+
> HTTP_PROXY=http://127.0.0.1:8082 npm run --silent cli --base=http://127.0.0.1:8000
112120
113121
## Interpreting the Results
114122

cli.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { runTests, getResults } from './client/runner.mjs'
22
import * as display from './lib/display.mjs'
33
import { GREEN, NC } from './lib/defines.mjs'
4-
import fetch from 'node-fetch'
4+
import fetch from 'node-fetch-with-proxy'
55
import tests from './tests/index.mjs'
66
import surrogate from './tests/surrogate-control.mjs'
77

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"liquidjs": "^9.16.1",
1313
"marked": "^4.0.12",
1414
"node-fetch": "3.1.1",
15+
"node-fetch-with-proxy": "^0.1.6",
1516
"npm": "^6.14.11"
1617
},
1718
"scripts": {

0 commit comments

Comments
 (0)