1
- import test from 'tape'
1
+ import assert from 'node:assert/strict'
2
+ import test from 'node:test'
2
3
import { parse } from 'acorn'
3
4
import { positionFromEstree } from './index.js'
4
5
5
- test ( 'unist-util-position-from-estree' , ( t ) => {
6
- t . deepEqual (
6
+ test ( 'unist-util-position-from-estree' , ( ) => {
7
+ assert . deepEqual (
7
8
positionFromEstree ( ) ,
8
9
{
9
10
start : { line : undefined , column : undefined , offset : undefined } ,
@@ -12,7 +13,7 @@ test('unist-util-position-from-estree', (t) => {
12
13
'should support a missing node'
13
14
)
14
15
15
- t . deepEqual (
16
+ assert . deepEqual (
16
17
positionFromEstree ( parse ( 'x' , { ecmaVersion : 2020 } ) ) ,
17
18
{
18
19
start : { line : undefined , column : undefined , offset : 0 } ,
@@ -21,7 +22,7 @@ test('unist-util-position-from-estree', (t) => {
21
22
'should support node w/o `loc`s'
22
23
)
23
24
24
- t . deepEqual (
25
+ assert . deepEqual (
25
26
positionFromEstree ( parse ( 'x' , { ecmaVersion : 2020 , locations : true } ) ) ,
26
27
{
27
28
start : { line : 1 , column : 1 , offset : 0 } ,
@@ -30,14 +31,12 @@ test('unist-util-position-from-estree', (t) => {
30
31
'should support node w/ `loc`s'
31
32
)
32
33
33
- t . deepEqual (
34
+ assert . deepEqual (
34
35
positionFromEstree ( parse ( 'x' , { ecmaVersion : 2020 , ranges : true } ) ) ,
35
36
{
36
37
start : { line : undefined , column : undefined , offset : 0 } ,
37
38
end : { line : undefined , column : undefined , offset : 1 }
38
39
} ,
39
40
'should support node w/ `range`s'
40
41
)
41
-
42
- t . end ( )
43
42
} )
0 commit comments