Skip to content

Commit b1f9134

Browse files
committed
Fix tests for changes in @types/unist
1 parent ed149a3 commit b1f9134

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ import remark from 'remark'
33
import {findAllBefore} from './index.js'
44

55
var tree = remark().parse('Some _emphasis_, **importance**, and `code`.')
6+
// @ts-expect-error hush.
67
var paragraph = tree.children[0]
78
var children = paragraph.children
89

910
test('unist-util-find-all-before', function (t) {
1011
t.throws(
1112
function () {
12-
// @ts-ignore runtime.
13+
// @ts-expect-error runtime.
1314
findAllBefore()
1415
},
1516
/Expected parent node/,
@@ -18,7 +19,7 @@ test('unist-util-find-all-before', function (t) {
1819

1920
t.throws(
2021
function () {
21-
// @ts-ignore runtime.
22+
// @ts-expect-error runtime.
2223
findAllBefore({type: 'foo'})
2324
},
2425
/Expected parent node/,
@@ -27,7 +28,7 @@ test('unist-util-find-all-before', function (t) {
2728

2829
t.throws(
2930
function () {
30-
// @ts-ignore runtime.
31+
// @ts-expect-error runtime.
3132
findAllBefore({type: 'foo', children: []})
3233
},
3334
/Expected child node or index/,
@@ -52,7 +53,7 @@ test('unist-util-find-all-before', function (t) {
5253

5354
t.throws(
5455
function () {
55-
// @ts-ignore runtime.
56+
// @ts-expect-error runtime.
5657
findAllBefore({type: 'foo', children: [{type: 'bar'}]}, 1, false)
5758
},
5859
/Expected function, string, or object as test/,
@@ -61,7 +62,7 @@ test('unist-util-find-all-before', function (t) {
6162

6263
t.throws(
6364
function () {
64-
// @ts-ignore runtime.
65+
// @ts-expect-error runtime.
6566
findAllBefore({type: 'foo', children: [{type: 'bar'}]}, 1, true)
6667
},
6768
/Expected function, string, or object as test/,

0 commit comments

Comments
 (0)