Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing/Coverage #138

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Testing/Coverage #138

wants to merge 3 commits into from

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.

- 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