1- 'use strict' ;
1+ 'use strict'
22
3- var test = require ( 'tape' ) ;
4- var toString = require ( '.' ) ;
3+ var test = require ( 'tape' )
4+ var toString = require ( '.' )
55
6- test ( 'mdast-util-to-string' , function ( t ) {
7- t . throws (
8- function ( ) {
9- toString ( ) ;
10- } ,
11- 'should fail without node'
12- ) ;
6+ test ( 'mdast-util-to-string' , function ( t ) {
7+ t . throws ( function ( ) {
8+ toString ( )
9+ } , 'should fail without node' )
1310
1411 t . equal (
1512 toString ( { value : 'foo' } ) ,
1613 'foo' ,
1714 'should not fail on unrecognised nodes'
18- ) ;
15+ )
1916
2017 t . equal (
2118 toString ( {
@@ -24,23 +21,19 @@ test('mdast-util-to-string', function (t) {
2421 } ) ,
2522 'foo' ,
2623 'should prefer `value` over all others'
27- ) ;
24+ )
2825
2926 t . equal (
30- toString ( {
31- value : 'foo' ,
32- alt : 'bar' ,
33- title : 'baz'
34- } ) ,
27+ toString ( { value : 'foo' , alt : 'bar' , title : 'baz' } ) ,
3528 'foo' ,
3629 'should prefer `value` over `alt` or `title`'
37- ) ;
30+ )
3831
3932 t . equal (
4033 toString ( { alt : 'bar' , title : 'baz' } ) ,
4134 'bar' ,
4235 'should prefer `alt` over `title`'
43- ) ;
36+ )
4437
4538 t . equal (
4639 toString ( {
@@ -49,21 +42,15 @@ test('mdast-util-to-string', function (t) {
4942 } ) ,
5043 'baz' ,
5144 'should use `title` over `children`'
52- ) ;
45+ )
5346
5447 t . equal (
55- toString ( {
56- children : [ { value : 'foo' } , { alt : 'bar' } , { title : 'baz' } ]
57- } ) ,
48+ toString ( { children : [ { value : 'foo' } , { alt : 'bar' } , { title : 'baz' } ] } ) ,
5849 'foobarbaz' ,
5950 'should prefer `children`'
60- ) ;
51+ )
6152
62- t . equal (
63- toString ( { } ) ,
64- '' ,
65- 'should fall back on an empty string'
66- ) ;
53+ t . equal ( toString ( { } ) , '' , 'should fall back on an empty string' )
6754
68- t . end ( ) ;
69- } ) ;
55+ t . end ( )
56+ } )
0 commit comments