-
Notifications
You must be signed in to change notification settings - Fork 1
Parser tests #13
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
Parser tests #13
Conversation
package.json
Outdated
| "url": "git://github.com/twingly/twingly-search-api-node.git" | ||
| }, | ||
| "dependencies": { | ||
| "chai-datetime": "^1.4.0", |
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.
shouldn't these be dev dependencies?
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.
Indeed they should, I used --save when I should have used --save-dev, will fix, thanks
|
LGTM |
1s -> ~500ms
test/test_result.js
Outdated
| it('creation', function(done){ | ||
| var data = fs.readFileSync('./test/fixtures/valid_result.xml', {encoding: 'utf8'}); | ||
| (new Parser()).parse(data, function(error, result){ | ||
| expect(result).to.be.instanceof(Result); |
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.
Don't think this is needed here, the point is not to check the return value of the parser but to assert that we find certain properties on the Result type (this is a test for Result).
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.
Yes, that makes sense, thanks.
> Don't think this is needed here, the point is not to check the return > value of the parser but to assert that we find certain properties on > the Result type (this is a test for Result).
|
LGTM again :D |
|
😄 |
Test the parser in the same fashion as twingly/twingly-search-api-ruby#49