11import assert from 'node:assert/strict'
22import fs from 'node:fs/promises'
3- import test from 'tape '
3+ import test from 'node:test '
44import { toHtml } from 'hast-util-to-html'
55import { toHast } from 'mdast-util-to-hast'
66import { fromMarkdown } from 'mdast-util-from-markdown'
@@ -11,8 +11,8 @@ import {
1111 gfmAutolinkLiteralToMarkdown
1212} from '../index.js'
1313
14- test ( 'markdown -> mdast' , ( t ) => {
15- t . deepEqual (
14+ test ( 'markdown -> mdast' , ( ) => {
15+ assert . deepEqual (
1616 fromMarkdown (
1717 'www.example.com, https://example.com, and contact@example.com.' ,
1818 {
@@ -122,7 +122,7 @@ test('markdown -> mdast', (t) => {
122122 'should support autolink literals'
123123 )
124124
125- t . deepEqual (
125+ assert . deepEqual (
126126 fromMarkdown ( '[https://google.com](https://google.com)' , {
127127 extensions : [ gfmAutolinkLiteral ] ,
128128 mdastExtensions : [ gfmAutolinkLiteralFromMarkdown ]
@@ -166,12 +166,10 @@ test('markdown -> mdast', (t) => {
166166 } ,
167167 'should support normal links'
168168 )
169-
170- t . end ( )
171169} )
172170
173- test ( 'mdast -> markdown' , async ( t ) => {
174- t . deepEqual (
171+ test ( 'mdast -> markdown' , async ( ) => {
172+ assert . deepEqual (
175173 toMarkdown (
176174 {
177175 type : 'paragraph' ,
@@ -192,7 +190,7 @@ test('mdast -> markdown', async (t) => {
192190 'should not serialize autolink literals'
193191 )
194192
195- t . deepEqual (
193+ assert . deepEqual (
196194 toMarkdown (
197195 { type : 'paragraph' , children : [ { type : 'text' , value : 'a b@c.d' } ] } ,
198196 { extensions : [ gfmAutolinkLiteralToMarkdown ] }
@@ -201,7 +199,7 @@ test('mdast -> markdown', async (t) => {
201199 'should escape at signs if they appear in what looks like an email'
202200 )
203201
204- t . deepEqual (
202+ assert . deepEqual (
205203 toMarkdown (
206204 { type : 'paragraph' , children : [ { type : 'text' , value : 'a @c' } ] } ,
207205 { extensions : [ gfmAutolinkLiteralToMarkdown ] }
@@ -210,7 +208,7 @@ test('mdast -> markdown', async (t) => {
210208 'should not escape at signs if they appear in what can’t be an email'
211209 )
212210
213- t . deepEqual (
211+ assert . deepEqual (
214212 toMarkdown (
215213 { type : 'paragraph' , children : [ { type : 'text' , value : 'a www.b.c' } ] } ,
216214 { extensions : [ gfmAutolinkLiteralToMarkdown ] }
@@ -219,7 +217,7 @@ test('mdast -> markdown', async (t) => {
219217 'should escape dots if they appear in what looks like a domain'
220218 )
221219
222- t . deepEqual (
220+ assert . deepEqual (
223221 toMarkdown (
224222 { type : 'paragraph' , children : [ { type : 'text' , value : 'a.b' } ] } ,
225223 { extensions : [ gfmAutolinkLiteralToMarkdown ] }
@@ -228,7 +226,7 @@ test('mdast -> markdown', async (t) => {
228226 'should not escape dots if they appear in what can’t be a domain'
229227 )
230228
231- t . deepEqual (
229+ assert . deepEqual (
232230 toMarkdown (
233231 { type : 'paragraph' , children : [ { type : 'text' , value : 'https:/' } ] } ,
234232 { extensions : [ gfmAutolinkLiteralToMarkdown ] }
@@ -237,7 +235,7 @@ test('mdast -> markdown', async (t) => {
237235 'should escape colons if they appear in what looks like a http protocol'
238236 )
239237
240- t . deepEqual (
238+ assert . deepEqual (
241239 toMarkdown (
242240 { type : 'paragraph' , children : [ { type : 'text' , value : 'https:a' } ] } ,
243241 { extensions : [ gfmAutolinkLiteralToMarkdown ] }
@@ -246,7 +244,7 @@ test('mdast -> markdown', async (t) => {
246244 'should not escape colons if they appear in what can’t be a http protocol'
247245 )
248246
249- t . deepEqual (
247+ assert . deepEqual (
250248 toMarkdown (
251249 { type : 'definition' , label : 'http://a' , identifier : '' , url : '' } ,
252250 { extensions : [ gfmAutolinkLiteralToMarkdown ] }
@@ -255,7 +253,7 @@ test('mdast -> markdown', async (t) => {
255253 'should not escape colons in definition labels'
256254 )
257255
258- t . deepEqual (
256+ assert . deepEqual (
259257 toMarkdown (
260258 {
261259 type : 'paragraph' ,
@@ -275,7 +273,7 @@ test('mdast -> markdown', async (t) => {
275273 'should not escape colons in link (reference) labels (shortcut)'
276274 )
277275
278- t . deepEqual (
276+ assert . deepEqual (
279277 toMarkdown (
280278 {
281279 type : 'paragraph' ,
@@ -295,7 +293,7 @@ test('mdast -> markdown', async (t) => {
295293 'should not escape colons in link (reference) labels (text)'
296294 )
297295
298- t . deepEqual (
296+ assert . deepEqual (
299297 toMarkdown (
300298 {
301299 type : 'paragraph' ,
@@ -315,7 +313,7 @@ test('mdast -> markdown', async (t) => {
315313 'should not escape colons in link (reference) labels (label)'
316314 )
317315
318- t . deepEqual (
316+ assert . deepEqual (
319317 toMarkdown (
320318 {
321319 type : 'paragraph' ,
@@ -333,7 +331,7 @@ test('mdast -> markdown', async (t) => {
333331 'should not escape colons in link (resource) labels'
334332 )
335333
336- t . deepEqual (
334+ assert . deepEqual (
337335 toMarkdown (
338336 {
339337 type : 'paragraph' ,
@@ -353,7 +351,7 @@ test('mdast -> markdown', async (t) => {
353351 'should not escape colons in image (reference) labels (label)'
354352 )
355353
356- t . deepEqual (
354+ assert . deepEqual (
357355 toMarkdown (
358356 {
359357 type : 'paragraph' ,
@@ -373,7 +371,7 @@ test('mdast -> markdown', async (t) => {
373371 'should not escape colons in image (reference) labels (alt)'
374372 )
375373
376- t . deepEqual (
374+ assert . deepEqual (
377375 toMarkdown (
378376 {
379377 type : 'paragraph' ,
@@ -419,8 +417,6 @@ test('mdast -> markdown', async (t) => {
419417 actual += '\n'
420418 }
421419
422- t . deepEqual ( actual , expected , stem )
420+ assert . deepEqual ( actual , expected , stem )
423421 }
424-
425- t . end ( )
426422} )
0 commit comments