Skip to content

Commit 42e565f

Browse files
committed
Refactor to reorder some props
1 parent da2d6bc commit 42e565f

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

Diff for: test/index.js

+29-29
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@ test('parse document', () => {
77
const tree = fromHtmlIsomorphic(html)
88

99
assert.deepEqual(tree, {
10+
type: 'root',
1011
children: [
1112
{
13+
type: 'element',
14+
tagName: 'html',
15+
properties: {},
1216
children: [
1317
{
14-
children: [],
15-
properties: {},
18+
type: 'element',
1619
tagName: 'head',
17-
type: 'element'
20+
properties: {},
21+
children: []
1822
},
1923
{
20-
children: [],
21-
properties: {},
24+
type: 'element',
2225
tagName: 'body',
23-
type: 'element'
26+
properties: {},
27+
children: []
2428
}
25-
],
26-
properties: {},
27-
tagName: 'html',
28-
type: 'element'
29+
]
2930
}
30-
],
31-
type: 'root'
31+
]
3232
})
3333
})
3434

@@ -37,22 +37,22 @@ test('parse single element fragment', () => {
3737
const tree = fromHtmlIsomorphic(html, {fragment: true})
3838

3939
assert.deepEqual(tree, {
40+
type: 'root',
4041
children: [
4142
{
43+
type: 'element',
44+
tagName: 'div',
45+
properties: {},
4246
children: [
4347
{
44-
children: [],
45-
properties: {},
48+
type: 'element',
4649
tagName: 'p',
47-
type: 'element'
50+
properties: {},
51+
children: []
4852
}
49-
],
50-
properties: {},
51-
tagName: 'div',
52-
type: 'element'
53+
]
5354
}
54-
],
55-
type: 'root'
55+
]
5656
})
5757
})
5858

@@ -61,20 +61,20 @@ test('parse multi element fragment', () => {
6161
const tree = fromHtmlIsomorphic(html, {fragment: true})
6262

6363
assert.deepEqual(tree, {
64+
type: 'root',
6465
children: [
6566
{
66-
children: [],
67-
properties: {},
67+
type: 'element',
6868
tagName: 'p',
69-
type: 'element'
69+
children: [],
70+
properties: {}
7071
},
7172
{
72-
children: [],
73-
properties: {},
73+
type: 'element',
7474
tagName: 'div',
75-
type: 'element'
75+
properties: {},
76+
children: []
7677
}
77-
],
78-
type: 'root'
78+
]
7979
})
8080
})

0 commit comments

Comments
 (0)