1+ /**
2+ * @typedef {import('unist').Node } Node
3+ */
4+
15import test from 'tape'
26import fc from 'fast-check'
37import lodash from 'lodash'
@@ -10,6 +14,7 @@ test('unist-util-is properties', (t) => {
1014 t . doesNotThrow (
1115 ( ) =>
1216 fc . assert (
17+ // @ts -expect-error: fine.
1318 fc . property ( fc . record ( { type : fc . string ( { minLength : 1 } ) } ) , ( node ) =>
1419 is ( node )
1520 )
@@ -21,10 +26,11 @@ test('unist-util-is properties', (t) => {
2126 ( ) =>
2227 fc . assert (
2328 fc . property (
24- fc . unicodeJsonObject ( ) . filter (
29+ fc . unicodeJsonValue ( ) . filter (
2530 // @ts -expect-error Looks like a node.
2631 ( node ) => ! ( isPlainObject ( node ) && typeof node . type === 'string' )
2732 ) ,
33+ // @ts -expect-error: fine.
2834 ( node ) => ! is ( node )
2935 )
3036 ) ,
@@ -34,9 +40,10 @@ test('unist-util-is properties', (t) => {
3440 t . doesNotThrow (
3541 ( ) =>
3642 fc . assert (
37- fc . property ( fc . record ( { type : fc . string ( { minLength : 1 } ) } ) , ( node ) =>
43+ // @ts -expect-error: fine.
44+ fc . property ( fc . record ( { type : fc . string ( { minLength : 1 } ) } ) , node => {
3845 is ( node , node . type )
39- )
46+ } )
4047 ) ,
4148 'should match types'
4249 )
@@ -45,9 +52,8 @@ test('unist-util-is properties', (t) => {
4552 ( ) =>
4653 fc . assert (
4754 fc . property (
48- // @ts -expect-error: hush
4955 fc
50- . unicodeJsonObject ( )
56+ . unicodeJsonValue ( )
5157 // Filter for JSON objects which unist can work with
5258 . filter (
5359 ( node ) =>
@@ -66,6 +72,7 @@ test('unist-util-is properties', (t) => {
6672 )
6773 )
6874 ) ,
75+ // @ts -expect-error: fine.
6976 fc . string ( { minLength : 1 } ) ,
7077 (
7178 /** @type {[Object.<string, unknown>, Array.<string>] } */ nodeAndKeys ,
0 commit comments