11/**
22 * @typedef {import('unist').Node } Node
3- * @typedef {import('mdast').Root } Root
43 */
54
65import assert from 'node:assert'
@@ -9,8 +8,6 @@ import {remark} from 'remark'
98import { findBefore } from './index.js'
109
1110test ( 'unist-util-find-before' , ( t ) => {
12- /** @type {Root } */
13- // @ts -expect-error: fine.
1411 const tree = remark ( ) . parse ( 'Some *emphasis*, **importance**, and `code`.' )
1512
1613 assert ( tree . type === 'root' )
@@ -23,7 +20,7 @@ test('unist-util-find-before', (t) => {
2320
2421 t . throws (
2522 ( ) => {
26- // @ts -ignore runtime
23+ // @ts -expect-error runtime
2724 findBefore ( )
2825 } ,
2926 / E x p e c t e d p a r e n t n o d e / ,
@@ -32,7 +29,7 @@ test('unist-util-find-before', (t) => {
3229
3330 t . throws (
3431 ( ) => {
35- // @ts -ignore runtime
32+ // @ts -expect-error runtime
3633 findBefore ( { type : 'foo' } )
3734 } ,
3835 / E x p e c t e d p a r e n t n o d e / ,
@@ -41,7 +38,7 @@ test('unist-util-find-before', (t) => {
4138
4239 t . throws (
4340 ( ) => {
44- // @ts -ignore runtime
41+ // @ts -expect-error runtime
4542 findBefore ( { type : 'foo' , children : [ ] } )
4643 } ,
4744 / E x p e c t e d c h i l d n o d e o r i n d e x / ,
@@ -66,7 +63,7 @@ test('unist-util-find-before', (t) => {
6663
6764 t . throws (
6865 ( ) => {
69- // @ts -ignore runtime
66+ // @ts -expect-error runtime
7067 findBefore ( { type : 'foo' , children : [ { type : 'bar' } ] } , 1 , false )
7168 } ,
7269 / 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 / ,
@@ -75,7 +72,7 @@ test('unist-util-find-before', (t) => {
7572
7673 t . throws (
7774 ( ) => {
78- // @ts -ignore runtime
75+ // @ts -expect-error runtime
7976 findBefore ( { type : 'foo' , children : [ { type : 'bar' } ] } , 1 , true )
8077 } ,
8178 / 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