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

tests: use supertest to check response header values #2992

Closed
wants to merge 1 commit into from

Conversation

dougwilson
Copy link
Contributor

This is an alternative pull request for #2983 converting the usages to use supertest rather than continuing to use supertest. This helps align with goals like removing the should module from tests eventually, since there are no less should usages (plus, supertest provides these features).

The cause for these two pull requests is that there is discussion going on currently to change the prototype of the headers object from Object to null, which would remove global extension properties like .should.

res.headers.should.not.have.property('x-success');
done();
});
.expect(utils.shouldNotHaveHeader('X-Success'))
Copy link
Member

Choose a reason for hiding this comment

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

Misaligned indentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed :) Fixed now :O

@LinusU
Copy link
Member

LinusU commented May 11, 2016

Very nice 👍

@LinusU
Copy link
Member

LinusU commented May 11, 2016

LGTM

@dougwilson dougwilson deleted the tests-no-headers-should branch May 11, 2016 15:29
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

2 participants