We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In much of this library, we use functions as constructors and add methods to the prototype, using util.inherits for inheritance
util.inherits
We should probably rework this to use classes now that they're widely available.
For example:
chai-http/lib/request.js
Lines 307 to 318 in cc58a4b
Could be:
class TestAgent extends (Agent || Request) { constructor(app) { super(); if (typeof app === 'function') app = http.createServer(app); this.app = app; if (typeof app !== 'string' && app && app.listen && app.address && !app.address()) { this.app = app.listen(0) } } close(callback) { // ... } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In much of this library, we use functions as constructors and add methods to the prototype, using
util.inherits
for inheritanceWe should probably rework this to use classes now that they're widely available.
For example:
chai-http/lib/request.js
Lines 307 to 318 in cc58a4b
Could be:
The text was updated successfully, but these errors were encountered: