-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fix(core): make exchangeArrayState be right when move #2357
Conversation
@@ -411,8 +411,9 @@ test('array field move api with children', async () => { | |||
}) | |||
) | |||
await array.move(0, 2) | |||
expect(form.fields['array.0.name']).not.toBeUndefined() |
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.
为什么要删掉呢?
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.
这个单元测试是之前的 交换 的逻辑,实际应该验证的逻辑是现在的,插入后再移动
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.
0 -> 2,原先是 0, 1, 2(name)
,就变成 1, 2(name), 0
,所以测试应该是 0 和 2 位没有,1 位有
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.
好的
Codecov Report
@@ Coverage Diff @@
## formily_next #2357 +/- ##
=============================================
Coverage 95.31% 95.31%
=============================================
Files 140 140
Lines 6120 6129 +9
Branches 1543 1547 +4
=============================================
+ Hits 5833 5842 +9
Misses 282 282
Partials 5 5
Continue to review full report at Codecov.
|
Before submitting a pull request, please make sure the following is done...
master
orformily_next
.npm test
).npm run lint
) - we've done our best to make sure these rules match our internal linting guidelines.Please do not delete the above content
What have you changed?
#2355