Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Parser tests - #13

Merged
dentarg merged 7 commits into
masterfrom
parser-tests
Feb 18, 2016
Merged

dentarg merged 7 commits into
masterfrom
parser-tests

Conversation

@dentarg

@dentarg dentarg commented Feb 18, 2016

Copy link
Copy Markdown
Contributor

Test the parser in the same fashion as twingly/twingly-search-api-ruby#49

Comment thread package.json Outdated
"url": "git://github.com/twingly/twingly-search-api-node.git"
},
"dependencies": {
"chai-datetime": "^1.4.0",

Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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

@walro

walro commented Feb 18, 2016

Copy link
Copy Markdown
Contributor

LGTM

Comment thread 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);

Copy link
Copy Markdown
Contributor

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).

Copy link
Copy Markdown
Contributor Author

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).
@walro

walro commented Feb 18, 2016

Copy link
Copy Markdown
Contributor

LGTM again :D

@dentarg

dentarg commented Feb 18, 2016

Copy link
Copy Markdown
Contributor Author

😄

dentarg added a commit that referenced this pull request Feb 18, 2016
@dentarg
dentarg merged commit a88afa4 into master Feb 18, 2016
@dentarg
dentarg deleted the parser-tests branch February 18, 2016 15:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants