Skip to content

Commit 593cf39

Browse files
committed
fix move test case
1 parent 6f7ec7f commit 593cf39

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/platforms/web/runtime/components/transition.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export default {
9393
// apply transition data to child
9494
// use getRealChild() to ignore abstract components e.g. keep-alive
9595
const child = getRealChild(rawChild)
96+
/* istanbul ignore if */
9697
if (!child) return
9798
child.key = child.key || `__v${child.tag + this._uid}__`
9899
const data = (child.data || (child.data = {})).transition = extractTransitionData(this)

test/unit/features/transition/transition-group.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ if (!isIE9) {
259259

260260
vm.items = ['d', 'b', 'a']
261261
waitForUpdate(() => {
262-
expect(vm.$el.innerHTML.replace(/\s?style=""\s?/g, '')).toBe(
262+
expect(vm.$el.innerHTML.replace(/\s?style=""(\s?)/g, '$1')).toBe(
263263
`<span>` +
264264
`<div class="test group-enter group-enter-active">d</div>` +
265265
`<div class="test">b</div>` +
@@ -268,16 +268,16 @@ if (!isIE9) {
268268
`</span>`
269269
)
270270
}).thenWaitFor(nextFrame).then(() => {
271-
expect(vm.$el.innerHTML.replace(/\s?style=""\s?/g, '')).toBe(
271+
expect(vm.$el.innerHTML.replace(/\s?style=""(\s?)/g, '$1')).toBe(
272272
`<span>` +
273273
`<div class="test group-enter-active">d</div>` +
274274
`<div class="test">b</div>` +
275275
`<div class="test group-move">a</div>` +
276276
`<div class="test group-leave-active group-move">c</div>` +
277277
`</span>`
278278
)
279-
}).thenWaitFor(duration + 10).then(() => {
280-
expect(vm.$el.innerHTML.replace(/\s?style=""\s?/g, '')).toBe(
279+
}).thenWaitFor(duration * 2).then(() => {
280+
expect(vm.$el.innerHTML.replace(/\s?style=""(\s?)/g, '$1')).toBe(
281281
`<span>` +
282282
`<div class="test">d</div>` +
283283
`<div class="test">b</div>` +

0 commit comments

Comments
 (0)