mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix] Suppress EADDRINUSE errors from test/examples-test.js since we are just looking for require-time errors. Isolate tests to ensure idempotency of ports
This commit is contained in:
parent
fd648a5290
commit
c4a7b15843
@ -35,8 +35,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "npm run-script test-http && npm run-script test-https",
|
||||
"test-http": "vows --spec && vows --spec --target=https",
|
||||
"test-https": "vows --spec --proxy=https && vows --spec --proxy=https --target=https",
|
||||
"test-http": "vows --spec -i && vows --spec -i --target=https",
|
||||
"test-https": "vows --spec -i --proxy=https && vows --spec -i --proxy=https --target=https",
|
||||
"test-core": "test/core/run"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@ -9,6 +9,16 @@ var vows = require('vows')
|
||||
macros = require('./macros'),
|
||||
examples = macros.examples;
|
||||
|
||||
//
|
||||
// Suppress `EADDRINUSE` errors since
|
||||
// we are just checking for require-time errors
|
||||
//
|
||||
process.on('uncaughtException', function (err) {
|
||||
if (err.code !== 'EADDRINUSE') {
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
|
||||
vows.describe('node-http-proxy/examples').addBatch(
|
||||
examples.shouldHaveDeps()
|
||||
).addBatch(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user