Skip to content

Commit

Permalink
[fix] Suppress EADDRINUSE errors from test/examples-test.js since w…
Browse files Browse the repository at this point in the history
…e are just looking for require-time errors. Isolate tests to ensure idempotency of ports
  • Loading branch information
indexzero committed Jul 26, 2012
1 parent fd648a5 commit c4a7b15
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -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": {
Expand Down
10 changes: 10 additions & 0 deletions test/examples-test.js
Expand Up @@ -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(
Expand Down

0 comments on commit c4a7b15

Please sign in to comment.