1
- import test from 'tape'
1
+ import assert from 'node:assert/strict'
2
+ import test from 'node:test'
2
3
import { fromMarkdown } from 'mdast-util-from-markdown'
3
4
import { toMarkdown } from 'mdast-util-to-markdown'
4
5
import { removePosition } from 'unist-util-remove-position'
8
9
gfmStrikethroughToMarkdown
9
10
} from './index.js'
10
11
11
- test ( 'markdown -> mdast ' , ( t ) => {
12
- t . deepEqual (
12
+ test ( 'gfmStrikethroughFromMarkdown ' , ( ) => {
13
+ assert . deepEqual (
13
14
removePosition (
14
15
fromMarkdown ( 'a ~~b~~ c.' , {
15
16
extensions : [ gfmStrikethrough ( ) ] ,
@@ -33,7 +34,7 @@ test('markdown -> mdast', (t) => {
33
34
'should support strikethrough'
34
35
)
35
36
36
- t . deepEqual (
37
+ assert . deepEqual (
37
38
removePosition (
38
39
fromMarkdown ( 'a ~~b\nc~~ d.' , {
39
40
extensions : [ gfmStrikethrough ( ) ] ,
@@ -56,12 +57,10 @@ test('markdown -> mdast', (t) => {
56
57
} ,
57
58
'should support strikethrough w/ eols'
58
59
)
59
-
60
- t . end ( )
61
60
} )
62
61
63
- test ( 'mdast -> markdown ' , ( t ) => {
64
- t . deepEqual (
62
+ test ( 'gfmStrikethroughToMarkdown ' , ( ) => {
63
+ assert . deepEqual (
65
64
toMarkdown (
66
65
{
67
66
type : 'paragraph' ,
@@ -77,7 +76,7 @@ test('mdast -> markdown', (t) => {
77
76
'should serialize strikethrough'
78
77
)
79
78
80
- t . deepEqual (
79
+ assert . deepEqual (
81
80
toMarkdown (
82
81
{
83
82
type : 'paragraph' ,
@@ -93,7 +92,7 @@ test('mdast -> markdown', (t) => {
93
92
'should serialize strikethrough w/ eols'
94
93
)
95
94
96
- t . equal (
95
+ assert . equal (
97
96
toMarkdown (
98
97
{
99
98
type : 'paragraph' ,
@@ -111,7 +110,7 @@ test('mdast -> markdown', (t) => {
111
110
'should not escape tildes in a `destinationLiteral`'
112
111
)
113
112
114
- t . equal (
113
+ assert . equal (
115
114
toMarkdown (
116
115
{
117
116
type : 'paragraph' ,
@@ -129,7 +128,7 @@ test('mdast -> markdown', (t) => {
129
128
'should not escape tildes in a `destinationRaw`'
130
129
)
131
130
132
- t . equal (
131
+ assert . equal (
133
132
toMarkdown (
134
133
{
135
134
type : 'paragraph' ,
@@ -148,7 +147,7 @@ test('mdast -> markdown', (t) => {
148
147
'should not escape tildes in a `reference`'
149
148
)
150
149
151
- t . equal (
150
+ assert . equal (
152
151
toMarkdown (
153
152
{
154
153
type : 'paragraph' ,
@@ -167,7 +166,7 @@ test('mdast -> markdown', (t) => {
167
166
'should not escape tildes in a `title` (double quotes)'
168
167
)
169
168
170
- t . equal (
169
+ assert . equal (
171
170
toMarkdown (
172
171
{
173
172
type : 'paragraph' ,
@@ -188,6 +187,4 @@ test('mdast -> markdown', (t) => {
188
187
"[](# '~a')\n" ,
189
188
'should not escape tildes in a `title` (single quotes)'
190
189
)
191
-
192
- t . end ( )
193
190
} )
0 commit comments