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

Various fixes #60

Merged
merged 6 commits into from
Aug 1, 2017
Merged

Various fixes #60

merged 6 commits into from
Aug 1, 2017

Conversation

dgkanatsios
Copy link
Contributor

Thank you for this great library! I have provided fixes for #52 and #46, provided relevant tests and also fixed some tests since filltext.com does not return 1 as the first ID any more.

var t = require('chai').assert;

describe('Various', function () {
it('should work with Basic Authentication', function (done) {
Copy link
Owner

Choose a reason for hiding this comment

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

could we split this file in two, one for "test/auth.test.js" another one for "test/cookie.test.js" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in latest commit

@@ -11,15 +11,15 @@ describe('Defaults', function () {
});
r('http://www.filltext.com/?rows=1', function (err, response, body) {
t.strictEqual(response.statusCode, 200);
t.strictEqual(body[0].d, 1);
t.isNumber(body[0].d);
Copy link
Owner

Choose a reason for hiding this comment

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

Hum, why not. I prefer to ensure that the response is as it should be (because it's free here to do so), why would we want to prefer isNumber here?

Copy link
Contributor Author

@dgkanatsios dgkanatsios Jul 26, 2017

Choose a reason for hiding this comment

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

As mentioned in PR comment, filltext.com does not return 1 but a random integer, e.g. try running

curl http://www.filltext.com/?rows=1&d=index

For me, it returns 17120, so the strictEqual tests were failing. I replaced them with isNumber so that they pass.

Copy link
Owner

Choose a reason for hiding this comment

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

👍

@FGRibreau FGRibreau merged commit dc4026f into FGRibreau:master Aug 1, 2017
@FGRibreau
Copy link
Owner

Released in v1.12.2, thanks!

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.

2 participants