@@ -3,7 +3,7 @@ import { remark } from 'remark'
33import find from './index.js'
44
55test ( 'unist-find' , function ( t ) {
6- var tree = remark ( ) . parse ( 'Some _emphasis_, **strongness**, and `code`.' )
6+ const tree = remark ( ) . parse ( 'Some _emphasis_, **strongness**, and `code`.' )
77
88 t . throws ( function ( ) {
99 find ( )
@@ -14,23 +14,23 @@ test('unist-find', function (t) {
1414 } , 'should fail without condition' )
1515
1616 t . test ( 'should find with string condition' , function ( st ) {
17- var result = find ( tree , 'value' )
17+ const result = find ( tree , 'value' )
1818
1919 st . equal ( result , tree . children [ 0 ] . children [ 0 ] )
2020
2121 st . end ( )
2222 } )
2323
2424 t . test ( 'should find with object condition' , function ( st ) {
25- var result = find ( tree , { type : 'emphasis' } )
25+ const result = find ( tree , { type : 'emphasis' } )
2626
2727 st . equal ( result , tree . children [ 0 ] . children [ 1 ] )
2828
2929 st . end ( )
3030 } )
3131
3232 t . test ( 'should find with function condition' , function ( st ) {
33- var result = find ( tree , function ( node ) {
33+ const result = find ( tree , function ( node ) {
3434 return node . type === 'inlineCode'
3535 } )
3636
@@ -40,7 +40,7 @@ test('unist-find', function (t) {
4040 } )
4141
4242 t . test ( 'should return undefined if no matches' , function ( st ) {
43- var result = find ( tree , 'nope, nope, nope' )
43+ const result = find ( tree , 'nope, nope, nope' )
4444
4545 st . equal ( result , undefined )
4646
0 commit comments