-
Notifications
You must be signed in to change notification settings - Fork 244
ADD: coverage for VueWrapper #98
base: master
Are you sure you want to change the base?
Conversation
5337d67
to
81c974d
Compare
I've tried to change component dynamicly in a real demo, not in jest. It works correctly. I'll take a look at it again. |
Same case also occurs in https://github.com/akxcv/vuera/blob/master/tests/wrappers/VueWrapper-test.js#L122-L126 . the original case is
However, I think
It sync props failed actually (in jest test case, while it works correctly in real situation). When I think some cases written before might lack of accuracy as well, esspeically The code left without coverage (seems only 2 warpers) |
This PR will raise |
@akxcv LGTM |
* because the component filed is passed in curly braces of JSX, | ||
* and it can be changed in `setSate` operation. | ||
* However it won't occur in HOC mode or babel plugin mode. | ||
* this test will fail. I'm trying to fixed it. |
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.
Isn't it fixed already?
Summary
Add a test case of
VueWrapper
. The scope It covers lists below: https://github.com/akxcv/vuera/blob/master/src/wrappers/Vue.js#L85-L93https://github.com/akxcv/vuera/blob/master/src/wrappers/Vue.js#L38-L40
[BEFORE]
[AFTER]
Anything else relevant?
For current situation of vuera , this case will fail. I'm trying to fix it in the next PR.
When to meet this case?
When using a wrapper component, the component filed is passed in curly braces of JSX, so it can be dynamicly changed in
setSate
operation. However this case won't occur in HOC mode or babel plugin mode.