h2non / rocky

Full-featured, middleware-oriented, programmatic HTTP and WebSocket proxy for node.js (deprecated)
MIT License
371 stars 24 forks source link

Tests are not passing on a cloned master #84

Closed zaggino closed 8 years ago

zaggino commented 8 years ago

Hi, I wanted to run tests locally but they don't seem to pass even without me doing any modifications:

$ npm run test

> rocky@0.4.8 test C:\dev\rocky
> standard lib/**/*.js test/**/*.js --global suite --global test --global beforeEach --global afterEach && mocha --timeout 10000 --bail --reporter spec --ui tdd test/*.js test/*/*.js test/*/*/*.js

standard: Use JavaScript Standard Style (https://github.com/feross/standard)
  C:\dev\rocky\lib\base.js:22:13: Missing '()' invoking a constructor
  C:\dev\rocky\lib\base.js:33:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:55:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:75:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:96:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:111:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:112:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:128:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:149:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:162:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:175:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:188:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:201:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:215:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:216:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:232:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:245:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:258:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:271:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\base.js:272:3: Irregular whitespace not allowed
  C:\dev\rocky\lib\protocols\http\passes\forward.js:99:5: Return statement should not contain assignment.
  C:\dev\rocky\lib\protocols\http\passes\forward.js:113:17: Missing '()' invoking a constructor
  C:\dev\rocky\lib\protocols\http\passes\forward.js:162:18: Missing '()' invoking a constructor
  C:\dev\rocky\lib\protocols\http\passes\replay.js:39:7: "replays" is already defined
  C:\dev\rocky\lib\protocols\http\passes\replay.js:52:23: Missing '()' invoking a constructor
  C:\dev\rocky\lib\protocols\http\passes\replay.js:113:7: '&&' should be placed at the end of the line.
  C:\dev\rocky\lib\protocols\http\retry.js:33:11: "options" is not defined.
  C:\dev\rocky\lib\protocols\ws\dispatcher.js:1:7: "proxy" is defined but never used
  C:\dev\rocky\lib\protocols\ws\dispatcher.js:13:9: "opts" is defined but never used
  C:\dev\rocky\lib\rocky.js:42:21: Irregular whitespace not allowed
  C:\dev\rocky\lib\route.js:3:7: "assign" is defined but never used
  C:\dev\rocky\test\helpers.js:19:29: Missing '()' invoking a constructor
  C:\dev\rocky\test\helpers.js:29:15: Missing '()' invoking a constructor
  C:\dev\rocky\test\helpers.js:31:28: Expected consistent spacing
  C:\dev\rocky\test\helpers.js:39:12: The '__proto__' property is deprecated.
  C:\dev\rocky\test\helpers.js:39:42: The '__proto__' property is deprecated.
  C:\dev\rocky\test\http.js:72:5: Expected error to be handled.
  C:\dev\rocky\test\http.js:246:19: Expected '===' and instead saw '=='.
  C:\dev\rocky\test\http.js:614:17: Expected '===' and instead saw '=='.
  C:\dev\rocky\test\http.js:762:5: Expected error to be handled.
  C:\dev\rocky\test\http.js:789:5: Expected error to be handled.
  C:\dev\rocky\test\http.js:917:9: "start" is defined but never used
  C:\dev\rocky\test\http.js:948:5: Expected error to be handled.
  C:\dev\rocky\test\http.js:974:5: Expected error to be handled.
  C:\dev\rocky\test\http.js:1200:9: "server1" is defined but never used
  C:\dev\rocky\test\http.js:1201:9: "server2" is defined but never used
  C:\dev\rocky\test\http.js:1202:9: "server3" is defined but never used
  C:\dev\rocky\test\http.js:1241:9: "app" is defined but never used
  C:\dev\rocky\test\http.js:1303:10: "defer" is defined but never used
  C:\dev\rocky\test\protocols\http\dispatcher.js:3:7: "Emitter" is defined but never used
  C:\dev\rocky\test\protocols\http\dispatcher.js:10:19: Missing '()' invoking a constructor
  C:\dev\rocky\test\protocols\http\dispatcher.js:11:19: Missing '()' invoking a constructor
  C:\dev\rocky\test\protocols\http\dispatcher.js:36:19: Missing '()' invoking a constructor
  C:\dev\rocky\test\protocols\http\dispatcher.js:37:19: Missing '()' invoking a constructor
  C:\dev\rocky\test\protocols\http\passes\forward.js:19:40: Missing '()' invoking a constructor
  C:\dev\rocky\test\protocols\http\passes\forward.js:46:40: Missing '()' invoking a constructor
  C:\dev\rocky\test\protocols\http\passes\passes.js:1:7: "sinon" is defined but never used
  C:\dev\rocky\test\protocols\http\passes\passes.js:3:7: "passes" is defined but never used
  C:\dev\rocky\test\protocols\http\passes\replay.js:18:40: Missing '()' invoking a constructor
  C:\dev\rocky\test\protocols\http\response.js:5:13: Missing '()' invoking a constructor
  C:\dev\rocky\test\protocols\http\route-handler.js:11:19: Missing '()' invoking a constructor
  C:\dev\rocky\test\protocols\http\route-handler.js:12:19: Missing '()' invoking a constructor
  C:\dev\rocky\test\protocols\http\route-handler.js:36:19: Missing '()' invoking a constructor
  C:\dev\rocky\test\protocols\http\route-handler.js:37:19: Missing '()' invoking a constructor
  C:\dev\rocky\test\protocols\ws\dispatcher.js:3:7: "Emitter" is defined but never used
  C:\dev\rocky\test\protocols\ws\dispatcher.js:10:19: Missing '()' invoking a constructor
  C:\dev\rocky\test\protocols\ws\passes\forward.js:12:9: "spy" is defined but never used
  C:\dev\rocky\test\protocols\ws\passes\forward.js:16:9: "ws" is defined but never used
  C:\dev\rocky\test\websocket.js:1:7: "fs" is defined but never used
  C:\dev\rocky\test\websocket.js:3:7: "http" is defined but never used
  C:\dev\rocky\test\websocket.js:4:7: "sinon" is defined but never used
  C:\dev\rocky\test\websocket.js:5:7: "supertest" is defined but never used

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Zaggi\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "test"
npm ERR! node v4.2.2
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! rocky@0.4.8 test: `standard lib/**/*.js test/**/*.js --global suite --global test --global beforeEach --global afterEach && mocha --timeout 10000 --bail --reporter spec --ui tdd test/*.js test/*/*.js test/*/*/*.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rocky@0.4.8 test script 'standard lib/**/*.js test/**/*.js --global suite --global test --global beforeEach --global afterEach && mocha --timeout 10000 --bail --reporter spec --ui tdd test/*.js test/*/*.js test/*/*/*.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the rocky package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     standard lib/**/*.js test/**/*.js --global suite --global test --global beforeEach --global afterEach && mocha --timeout 10000 --bail --reporter spec --ui tdd test/*.js test/*/*.js test/*/*/*.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs rocky
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls rocky
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\dev\rocky\npm-debug.log
h2non commented 8 years ago

The tests are not executed. It's a failure of the standard linter. For some reason the glob path expander behaves differently from UNIX and Windows and some files are not begin processed properly. I'll fix it asap.

h2non commented 8 years ago

Fixed! Pull from master and all the tests should pass now without issues.

It was actually an issue of the standard linter I'm using, so I've reported it here: https://github.com/feross/standard/issues/364.

Thanks for reporting!