fix(runtime-core): patchChildren first in patchElement (#4313)

This commit is contained in:
2021-08-17 03:46:27 +08:00
committed by GitHub
parent cd2d98499e
commit 5b3f1e8424
3 changed files with 57 additions and 35 deletions

View File

@@ -103,18 +103,18 @@ describe('test renderer', () => {
expect(updateOps.length).toBe(2)
expect(updateOps[0]).toEqual({
type: NodeOpTypes.SET_ELEMENT_TEXT,
targetNode: root.children[0],
text: 'bar'
})
expect(updateOps[1]).toEqual({
type: NodeOpTypes.PATCH,
targetNode: root.children[0],
propKey: 'id',
propPrevValue: 'test',
propNextValue: 'foo'
})
expect(updateOps[1]).toEqual({
type: NodeOpTypes.SET_ELEMENT_TEXT,
targetNode: root.children[0],
text: 'bar'
})
})
it('should be able to serialize nodes', () => {