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

Feature request: add a section about tests #53

Open
davidbgk opened this issue Jun 7, 2016 · 4 comments
Open

Feature request: add a section about tests #53

davidbgk opened this issue Jun 7, 2016 · 4 comments

Comments

@davidbgk
Copy link

davidbgk commented Jun 7, 2016

Maybe add a section related to testing?

http://riotjs.com/forum/#!/using:testing-my-tags/if-you-use-a-test-suite-lik might be a starting point.

@jbmoelker
Copy link
Member

@davidbgk agree that would be a good addition. We haven't figured out the best test setup yet to put in the guide. We have a suggestion for "unit testing" pre-rendered tags and end-to-end testing of tags in isolation. However this also depends on a developer's preference for specific testing frameworks.

The Riot team is refactoring their unit test setup, so am also waiting to see what they come up with.

If the section would be "Test your tags", what do you feel should be in the how-to?

@davidbgk
Copy link
Author

davidbgk commented Jun 9, 2016

@jbmoelker nice, thanks for the inspiring links! I think that @GianlucaGuarini refers to that commit about the test refactoring which gives some insights on how it can be unit tested.

Maybe we should follow that path and "just" propose something in the vein of what you did for now. Having an example of the tag mount/unmount dance during a test would be great too :)

I'm pretty new to both JS and Riot so I'm not familiar with unit testing libs in these communities.

@jbmoelker
Copy link
Member

status update: @GianlucaGuarini has improved the test setup for Riot itself. Which is definitely worth a look. For example the core spec. Also notice the helpers, which you could reuse. Haven't tried it out myself yet, so am not yet comfortable writing anything about it in this guide.

@davidbgk
Copy link
Author

davidbgk commented Jul 7, 2016

Great, thanks for the update @jbmoelker 👍 I understand that it need to be tested (!) prior any addition to the guide :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants