1- 'use strict' ;
1+ 'use strict'
22
3- var test = require ( 'tape' ) ;
4- var stringify = require ( '.' ) ;
3+ var test = require ( 'tape' )
4+ var stringify = require ( '.' )
55
6- test ( 'stringifyPosition' , function ( t ) {
7- t . equal ( stringify ( ) , null , 'should return `null` with `undefined`' ) ;
8- t . equal ( stringify ( null ) , null , 'should return `null` with `null`' ) ;
9- t . equal ( stringify ( 'foo' ) , null , 'should return `null` with `string`' ) ;
10- t . equal ( stringify ( 5 ) , null , 'should return `null` with `number`' ) ;
11- t . equal ( stringify ( { } ) , null , 'should return `null` with `{}`' ) ;
6+ test ( 'stringifyPosition' , function ( t ) {
7+ t . equal ( stringify ( ) , null , 'should return `null` with `undefined`' )
8+ t . equal ( stringify ( null ) , null , 'should return `null` with `null`' )
9+ t . equal ( stringify ( 'foo' ) , null , 'should return `null` with `string`' )
10+ t . equal ( stringify ( 5 ) , null , 'should return `null` with `number`' )
11+ t . equal ( stringify ( { } ) , null , 'should return `null` with `{}`' )
1212
1313 t . equal (
1414 stringify ( { type : 'text' } ) ,
1515 '1:1-1:1' ,
1616 'should return a range for a `node` without `position`'
17- ) ;
17+ )
1818
1919 t . equal (
2020 stringify ( { type : 'text' , position : 3 } ) ,
2121 '1:1-1:1' ,
2222 'should return a range for `node` with invalid `position` #1'
23- ) ;
23+ )
2424
2525 t . equal (
2626 stringify ( {
@@ -29,7 +29,7 @@ test('stringifyPosition', function (t) {
2929 } ) ,
3030 '1:1-1:1' ,
3131 'should return a range for `node` with invalid `position` #2'
32- ) ;
32+ )
3333
3434 t . equal (
3535 stringify ( {
@@ -41,7 +41,7 @@ test('stringifyPosition', function (t) {
4141 } ) ,
4242 '1:1-1:1' ,
4343 'should return a range for `node` with invalid `position` #3'
44- ) ;
44+ )
4545
4646 t . equal (
4747 stringify ( {
@@ -53,25 +53,25 @@ test('stringifyPosition', function (t) {
5353 } ) ,
5454 '2:5-2:6' ,
5555 'should return a range for `node` with valid `position`'
56- ) ;
56+ )
5757
5858 t . equal (
5959 stringify ( { start : null , end : null } ) ,
6060 '1:1-1:1' ,
6161 'should return a range for a `position` without `point`s'
62- ) ;
62+ )
6363
6464 t . equal (
6565 stringify ( { start : 3 , end : 6 } ) ,
6666 '1:1-1:1' ,
6767 'should return a range for `position` with invalid `point`s #1'
68- ) ;
68+ )
6969
7070 t . equal (
7171 stringify ( { start : { } , end : { } } ) ,
7272 '1:1-1:1' ,
7373 'should return range for `position` with invalid `point`s #1'
74- ) ;
74+ )
7575
7676 t . equal (
7777 stringify ( {
@@ -80,7 +80,7 @@ test('stringifyPosition', function (t) {
8080 } ) ,
8181 '1:1-1:1' ,
8282 'should return range for `position` with invalid `point`s #3'
83- ) ;
83+ )
8484
8585 t . equal (
8686 stringify ( {
@@ -89,37 +89,37 @@ test('stringifyPosition', function (t) {
8989 } ) ,
9090 '2:5-2:6' ,
9191 'should return range for `position` with valid `point`s'
92- ) ;
92+ )
9393
9494 t . equal (
9595 stringify ( { line : null , column : null } ) ,
9696 '1:1' ,
9797 'should return a point for a `point` without indices'
98- ) ;
98+ )
9999
100100 t . equal (
101101 stringify ( { line : 'foo' , column : 'bar' } ) ,
102102 '1:1' ,
103103 'should return a point for a `point` with invalid indices #1'
104- ) ;
104+ )
105105
106106 t . equal (
107107 stringify ( { line : 4 } ) ,
108108 '4:1' ,
109109 'should return a point for a partially valid `point` #1'
110- ) ;
110+ )
111111
112112 t . equal (
113113 stringify ( { column : 12 } ) ,
114114 '1:12' ,
115115 'should return a point for a partially valid `point` #1'
116- ) ;
116+ )
117117
118118 t . equal (
119119 stringify ( { line : 5 , column : 2 } ) ,
120120 '5:2' ,
121121 'should return a point for a valid `point`'
122- ) ;
122+ )
123123
124- t . end ( ) ;
125- } ) ;
124+ t . end ( )
125+ } )
0 commit comments