@@ -4,7 +4,7 @@ var test = require('tape')
44var u = require ( 'unist-builder' )
55var filter = require ( '.' )
66
7- test ( 'should not traverse into children of filtered out nodes' , function ( t ) {
7+ test ( 'should not traverse into children of filtered out nodes' , function ( t ) {
88 var tree = u ( 'root' , [ u ( 'node' , [ u ( 'leaf' , '1' ) ] ) , u ( 'leaf' , '2' ) ] )
99 var types = { }
1010
@@ -19,7 +19,7 @@ test('should not traverse into children of filtered out nodes', function(t) {
1919 }
2020} )
2121
22- test ( 'should return `null` if root node is filtered out' , function ( t ) {
22+ test ( 'should return `null` if root node is filtered out' , function ( t ) {
2323 var tree = u ( 'root' , [ u ( 'node' , [ u ( 'leaf' , '1' ) ] ) , u ( 'leaf' , '2' ) ] )
2424
2525 t . deepEqual ( filter ( tree , predicate ) , null )
@@ -31,7 +31,7 @@ test('should return `null` if root node is filtered out', function(t) {
3131 }
3232} )
3333
34- test ( 'should cascade-remove parent nodes' , function ( t ) {
34+ test ( 'should cascade-remove parent nodes' , function ( t ) {
3535 var tree = u ( 'root' , [ u ( 'node' , [ u ( 'leaf' , '1' ) ] ) , u ( 'leaf' , '2' ) ] )
3636
3737 t . deepEqual ( filter ( tree , notOne ) , u ( 'root' , [ u ( 'leaf' , '2' ) ] ) )
@@ -48,15 +48,15 @@ test('should cascade-remove parent nodes', function(t) {
4848 }
4949} )
5050
51- test ( 'should not cascade-remove nodes that were empty initially' , function ( t ) {
51+ test ( 'should not cascade-remove nodes that were empty initially' , function ( t ) {
5252 var tree = u ( 'node' , [ u ( 'node' , [ ] ) , u ( 'node' , [ u ( 'leaf' ) ] ) ] )
5353
5454 t . deepEqual ( filter ( tree , 'node' ) , u ( 'node' , [ u ( 'node' , [ ] ) ] ) )
5555
5656 t . end ( )
5757} )
5858
59- test ( 'should call iterator with `index` and `parent` args' , function ( t ) {
59+ test ( 'should call iterator with `index` and `parent` args' , function ( t ) {
6060 var tree = u ( 'root' , [ u ( 'node' , [ u ( 'leaf' , '1' ) ] ) , u ( 'leaf' , '2' ) ] )
6161 var callLog = [ ]
6262
@@ -77,7 +77,7 @@ test('should call iterator with `index` and `parent` args', function(t) {
7777 }
7878} )
7979
80- test ( 'should support type and node tests' , function ( t ) {
80+ test ( 'should support type and node tests' , function ( t ) {
8181 var tree = u ( 'node' , [ u ( 'node' , [ u ( 'leaf' , '1' ) ] ) , u ( 'leaf' , '2' ) ] )
8282
8383 t . deepEqual ( filter ( tree , 'node' ) , null )
@@ -90,7 +90,7 @@ test('should support type and node tests', function(t) {
9090 t . end ( )
9191} )
9292
93- test ( 'opts.cascade' , function ( t ) {
93+ test ( 'opts.cascade' , function ( t ) {
9494 var tree = u ( 'root' , [ u ( 'node' , [ u ( 'leaf' , '1' ) ] ) , u ( 'leaf' , '2' ) ] )
9595
9696 t . deepEqual (
@@ -112,7 +112,7 @@ test('opts.cascade', function(t) {
112112 }
113113} )
114114
115- test ( 'example from README' , function ( t ) {
115+ test ( 'example from README' , function ( t ) {
116116 var tree = u ( 'root' , [
117117 u ( 'leaf' , '1' ) ,
118118 u ( 'node' , [ u ( 'leaf' , '2' ) , u ( 'node' , [ u ( 'leaf' , '3' ) ] ) ] ) ,
0 commit comments