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

Update tests for MSON refract #78

Merged
merged 4 commits into from Aug 6, 2015
Merged

Conversation

danielgtaylor
Copy link
Contributor

This fixes the currently-failing tests in the shared/refract branch by updating the fixture to use MSON refract and commenting out some MSON-AST specific tests that will need to be updated in the future.

@pksunkara
Copy link
Contributor

Tests failing. And are we not going to port the mocha tests?

@danielgtaylor
Copy link
Contributor Author

@pksunkara test are (finally) passing and there are some basic MSON Refract tests included now. I removed some of the more complex tests because I don't think they belong in a binding, but rather in the upstream library (e.g. whether a mixin generates the right elements). What we really care about in the binding is that a very basic example works without errors and produces refract elements in the right place. Thoughts?


attributes = result.ast.content[0].content[0].actions[0].examples[0].responses[0].content[0]
dataStructures = result.ast.content[1].content
console.log JSON.stringify(result.ast, null, 2)
Copy link
Contributor

Choose a reason for hiding this comment

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

Forgot to comment out?

@pksunkara
Copy link
Contributor

One minor thing. Will merge it once it's fixed.

This removes the old MSON AST based tests in favor of new MSON Refract ones.
The tests are significantly less complex because the exact structure of the
MSON result should be tested in the upstream library, not the language binding.
Here we just test for a very basic structure in both the attributes and
data structures sections.
@danielgtaylor
Copy link
Contributor Author

@pksunkara the extra console.log line has been removed 😄

pksunkara added a commit that referenced this pull request Aug 6, 2015
@pksunkara pksunkara merged commit 969e3fb into shared/refract Aug 6, 2015
@pksunkara pksunkara deleted the daniel/mson-tests branch August 6, 2015 08:34
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.

None yet

2 participants