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

Added prefix option for agents #465

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

Added prefix option for agents #465

wants to merge 4 commits into from

Conversation

Thann
Copy link

@Thann Thann commented Mar 7, 2018

This prevents users from having to repeat themselves in tests, by setting a common prefix for all routes.

@mikelax
Copy link
Contributor

mikelax commented May 14, 2018

I think this should be closed in favor of #453

@Thann
Copy link
Author

Thann commented May 14, 2018

These two PRs provide different features

@mikelax
Copy link
Contributor

mikelax commented May 17, 2018

@Thann yes you are right.
Let me give this some thought as I want to make sure if we start extending capabilities with extra "options" we do so in a way to keep the object Prototype manageable. I think along the lines of what you have with the optional options object is the way to go.

@@ -815,6 +815,17 @@ describe('request.agent(app)', function() {
});
});

describe('request.agent(app, {prefix})', function() {
it('should apply prefix', function(done) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you provide a successful test (e.g. with 200 status code) as well?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, I can't believe I didn't do that already!

@coveralls
Copy link

coveralls commented May 4, 2019

Pull Request Test Coverage Report for Build 407

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.8%) to 99.111%

Totals Coverage Status
Change from base Build 404: 1.8%
Covered Lines: 141
Relevant Lines: 142

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 407

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.8%) to 99.111%

Totals Coverage Status
Change from base Build 404: 1.8%
Covered Lines: 141
Relevant Lines: 142

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants