Skip to content

Commit ec79ffa

Browse files
committed
Fix tests for changes in @types/unist
1 parent ec1898a commit ec79ffa

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export const filter =
6666

6767
if (!is(node, index, parent)) return null
6868

69+
// @ts-expect-error: Looks like a parent.
6970
if (node.children) {
7071
childIndex = -1
7172

test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ test('should cascade-remove parent nodes', function (t) {
4949
* @param {Node} node
5050
*/
5151
function notOne(node) {
52+
// @ts-expect-error: fine.
5253
return node.value !== '1'
5354
}
5455

@@ -148,6 +149,7 @@ test('example from README', function (t) {
148149
* @param {Node} node
149150
*/
150151
function predicate(node) {
152+
// @ts-expect-error: fine.
151153
return node.type !== 'leaf' || Number(node.value) % 2 === 0
152154
}
153155
})

0 commit comments

Comments
 (0)