@@ -3,13 +3,14 @@ import remark from 'remark'
3
3
import { findAllBefore } from './index.js'
4
4
5
5
var tree = remark ( ) . parse ( 'Some _emphasis_, **importance**, and `code`.' )
6
+ // @ts -expect-error hush.
6
7
var paragraph = tree . children [ 0 ]
7
8
var children = paragraph . children
8
9
9
10
test ( 'unist-util-find-all-before' , function ( t ) {
10
11
t . throws (
11
12
function ( ) {
12
- // @ts -ignore runtime.
13
+ // @ts -expect-error runtime.
13
14
findAllBefore ( )
14
15
} ,
15
16
/ E x p e c t e d p a r e n t n o d e / ,
@@ -18,7 +19,7 @@ test('unist-util-find-all-before', function (t) {
18
19
19
20
t . throws (
20
21
function ( ) {
21
- // @ts -ignore runtime.
22
+ // @ts -expect-error runtime.
22
23
findAllBefore ( { type : 'foo' } )
23
24
} ,
24
25
/ E x p e c t e d p a r e n t n o d e / ,
@@ -27,7 +28,7 @@ test('unist-util-find-all-before', function (t) {
27
28
28
29
t . throws (
29
30
function ( ) {
30
- // @ts -ignore runtime.
31
+ // @ts -expect-error runtime.
31
32
findAllBefore ( { type : 'foo' , children : [ ] } )
32
33
} ,
33
34
/ E x p e c t e d c h i l d n o d e o r i n d e x / ,
@@ -52,7 +53,7 @@ test('unist-util-find-all-before', function (t) {
52
53
53
54
t . throws (
54
55
function ( ) {
55
- // @ts -ignore runtime.
56
+ // @ts -expect-error runtime.
56
57
findAllBefore ( { type : 'foo' , children : [ { type : 'bar' } ] } , 1 , false )
57
58
} ,
58
59
/ E x p e c t e d f u n c t i o n , s t r i n g , o r o b j e c t a s t e s t / ,
@@ -61,7 +62,7 @@ test('unist-util-find-all-before', function (t) {
61
62
62
63
t . throws (
63
64
function ( ) {
64
- // @ts -ignore runtime.
65
+ // @ts -expect-error runtime.
65
66
findAllBefore ( { type : 'foo' , children : [ { type : 'bar' } ] } , 1 , true )
66
67
} ,
67
68
/ E x p e c t e d f u n c t i o n , s t r i n g , o r o b j e c t a s t e s t / ,
0 commit comments