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

Add jest and simple test #1752

Merged
merged 3 commits into from
Apr 10, 2018
Merged

Add jest and simple test #1752

merged 3 commits into from
Apr 10, 2018

Conversation

nlopin
Copy link

@nlopin nlopin commented Mar 25, 2018

I've added Jest to the project.

There is an issue when you test components with external js libraries. For example, MarkdownPreview works with Raphael and its' extensions to draw graphs. I haven't figured out yet how to mock these stuff properly.

@nlopin
Copy link
Author

nlopin commented Mar 25, 2018

One big issue I'm thinking about. Jest doesn't work with refs properties, but MarkdownPreview is the wrapper around iframe and we interact with that iframe via refs.

@Rokt33r Rokt33r added the awaiting review ❇️ Pull request is awaiting a review. label Mar 25, 2018
@Rokt33r Rokt33r self-requested a review March 25, 2018 19:53
@sosukesuzuki sosukesuzuki self-requested a review April 3, 2018 08:59
Copy link
Member

@sosukesuzuki sosukesuzuki left a comment

Choose a reason for hiding this comment

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

I run yarn and yarn run jest, console shows the error like below.
please add jest-localstorage-mock.
2018-04-03 17 58 45

@flaviusone
Copy link

Jest doesn't work with refs properties

Can you detail this? Maybe you are referring to react-test-renderer and ref mocking?

Did you consider adding enzyme?

Great job for adding Jest. It's a big and important step for this project! 🎖

@kazup01 kazup01 added awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. and removed awaiting review ❇️ Pull request is awaiting a review. labels Apr 4, 2018
@Rokt33r Rokt33r merged commit 8ab190a into BoostIO:master Apr 10, 2018
@Rokt33r Rokt33r added next release (v0.12.0) and removed awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. labels Apr 10, 2018
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.

5 participants