Download ADOOR_ACE/node_modules/express-http-proxy/test/status.js from thisisAce/adoor-store: direct link, hf CLI and curl.
- Browser
- Download file 707 Bytes
-
https://huggingface.co/thisisAce/adoor-store/resolve/main/ADOOR_ACE/node_modules/express-http-proxy/test/status.js
- Command line
-
hf download hf://thisisAce/adoor-store/ADOOR_ACE/node_modules/express-http-proxy/test/status.js
-
curl -L -o status.js https://huggingface.co/thisisAce/adoor-store/resolve/main/ADOOR_ACE/node_modules/express-http-proxy/test/status.js
707 Bytes
| ; | |
| var express = require('express'); | |
| var request = require('supertest'); | |
| var proxy = require('../'); | |
| var mockEndpoint = require('../lib/mockHTTP.js'); | |
| describe('proxies status code', function () { | |
| var proxyServer = express(); | |
| var port = 21239; | |
| var proxiedEndpoint = 'http://localhost:' + port; | |
| var server; | |
| proxyServer.use(proxy(proxiedEndpoint)); | |
| beforeEach(function () { | |
| server = mockEndpoint.listen(21239); | |
| }); | |
| afterEach(function () { | |
| server.close(); | |
| }); | |
| [304, 404, 200, 401, 500].forEach(function (status) { | |
| it('on ' + status, function (done) { | |
| request(proxyServer) | |
| .get('/status/' + status) | |
| .expect(status, done); | |
| }); | |
| }); | |
| }); | |