Skip to content
Browse files

[fix] Suppress EADDRINUSE errors from `test/examples-test.js` since w…

…e are just looking for require-time errors. Isolate tests to ensure idempotency of ports
  • Loading branch information...
1 parent fd648a5 commit c4a7b1584302fe12a8fc06b6774db5ff602c3607 @indexzero indexzero committed Jul 26, 2012
Showing with 12 additions and 2 deletions.
  1. +2 −2 package.json
  2. +10 −0 test/examples-test.js
View
4 package.json
@@ -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": {
View
10 test/examples-test.js
@@ -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(

0 comments on commit c4a7b15

Please sign in to comment.
Something went wrong with that request. Please try again.