ADD: coverage for VueWrapper#98
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. |

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
setSateoperation. However this case won't occur in HOC mode or babel plugin mode.