-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
Various fixes #60
Conversation
test/various.test.js
Outdated
var t = require('chai').assert; | ||
|
||
describe('Various', function () { | ||
it('should work with Basic Authentication', function (done) { |
There was a problem hiding this comment.
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" ?
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Released in v1.12.2, thanks! |
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.