Skip to content

Conversation

@brettz9
Copy link

@brettz9 brettz9 commented Jul 7, 2020

Builds on #137. (I can rebase as needed if there are issues with the latter).

The fixes/refactoring were part and parcel for adding full tests/coverage.

  • Fix: Remove unused parameter passed to getWss in broadcast.js example (also renaming variable to reflect lack of specificity to route of web socket server)
  • Fix: Allow middleware error handler (arity 4) to be triggered
  • Refactoring: Remove upgradeReq check (dropped back in ws 3)
  • Testing: Add mocha/chai/nyc

Re: middleware error handler, Layer.prototype.handle_error of router (used by express.Router) only handles arity 4, so we need to return a function that has arity 4.

brettz9 added 3 commits July 7, 2020 11:25
- Linting: Lint `/examples` files also (using `overrides` to allow `console` therein)
- Refactoring: Switch to ES6 in examples and docs
- npm: Update airbnb to version advertised as compatible with exiting eslint version
…xample (also renaming variable to reflect lack of specificity to route of web socket server)

- Fix: Allow middleware error handler (arity 4) to be triggered
- Refactoring: Remove `upgradeReq` check (dropped back in ws 3)
- Testing: Add mocha/chai/nyc

Re: middleware error handler, `Layer.prototype.handle_error` of `router` (used by `express.Router`) only handles arity 4
@brettz9 brettz9 mentioned this pull request Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant