Skip to content

Commit 08b8bf3

Browse files
committed
Fix for changes in @types/unist
1 parent 7917335 commit 08b8bf3

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

test/fixtures/nodes/index.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ export default function assertion(t, zone, tree) {
1414
/** @type {import('../../../index.js').Handler} */
1515
function handle(_, nodes) {
1616
st.equal(nodes.length, 1)
17-
st.equal(nodes[0].type, 'paragraph')
18-
// @ts-ignore hush
19-
st.equal(nodes[0].children.length, 1)
20-
st.equal(nodes[0].children[0].type, 'text')
21-
st.equal(nodes[0].children[0].value, 'Foo.')
17+
const head = nodes[0]
18+
st.equal(head.type, 'paragraph')
19+
// @ts-expect-error: too vague.
20+
st.equal(head.children.length, 1)
21+
// @ts-expect-error: too vague.
22+
st.equal(head.children[0].type, 'text')
23+
// @ts-expect-error: too vague.
24+
st.equal(head.children[0].value, 'Foo.')
2225
st.equal(++count, 1)
2326
}
2427
})

test/fixtures/simple/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ export default function assertion(t, zone, tree) {
1212
/** @type {import('../../../index.js').Handler} */
1313
function handle(start, nodes, end) {
1414
st.equal(start.type, 'html')
15+
// @ts-expect-error: too vague.
1516
st.equal(start.value, '<!--foo start bar="baz"-->')
1617
st.deepEqual(nodes, [])
1718
st.equal(end.type, 'html')
19+
// @ts-expect-error: too vague.
1820
st.equal(end.value, '<!--foo end qux="quux"-->')
1921
}
2022
})

0 commit comments

Comments
 (0)