Skip to content

Commit 288a3cd

Browse files
committed
Use Node test runner
1 parent 6059f18 commit 288a3cd

File tree

3 files changed

+15
-19
lines changed

3 files changed

+15
-19
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ jobs:
1717
strategy:
1818
matrix:
1919
node:
20-
- lts/fermium
20+
- lts/gallium
2121
- node

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,13 @@
4343
"mdast-util-to-markdown": "^1.3.0"
4444
},
4545
"devDependencies": {
46-
"@types/tape": "^4.0.0",
46+
"@types/node": "^18.0.0",
4747
"c8": "^7.0.0",
4848
"mdast-util-from-markdown": "^1.0.0",
4949
"micromark-extension-gfm-strikethrough": "^1.0.0",
5050
"prettier": "^2.0.0",
5151
"remark-cli": "^11.0.0",
5252
"remark-preset-wooorm": "^9.0.0",
53-
"tape": "^5.0.0",
5453
"type-coverage": "^2.0.0",
5554
"typescript": "^4.0.0",
5655
"unist-util-remove-position": "^4.0.0",

test.js

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import test from 'tape'
1+
import assert from 'node:assert/strict'
2+
import test from 'node:test'
23
import {fromMarkdown} from 'mdast-util-from-markdown'
34
import {toMarkdown} from 'mdast-util-to-markdown'
45
import {removePosition} from 'unist-util-remove-position'
@@ -8,8 +9,8 @@ import {
89
gfmStrikethroughToMarkdown
910
} from './index.js'
1011

11-
test('markdown -> mdast', (t) => {
12-
t.deepEqual(
12+
test('gfmStrikethroughFromMarkdown', () => {
13+
assert.deepEqual(
1314
removePosition(
1415
fromMarkdown('a ~~b~~ c.', {
1516
extensions: [gfmStrikethrough()],
@@ -33,7 +34,7 @@ test('markdown -> mdast', (t) => {
3334
'should support strikethrough'
3435
)
3536

36-
t.deepEqual(
37+
assert.deepEqual(
3738
removePosition(
3839
fromMarkdown('a ~~b\nc~~ d.', {
3940
extensions: [gfmStrikethrough()],
@@ -56,12 +57,10 @@ test('markdown -> mdast', (t) => {
5657
},
5758
'should support strikethrough w/ eols'
5859
)
59-
60-
t.end()
6160
})
6261

63-
test('mdast -> markdown', (t) => {
64-
t.deepEqual(
62+
test('gfmStrikethroughToMarkdown', () => {
63+
assert.deepEqual(
6564
toMarkdown(
6665
{
6766
type: 'paragraph',
@@ -77,7 +76,7 @@ test('mdast -> markdown', (t) => {
7776
'should serialize strikethrough'
7877
)
7978

80-
t.deepEqual(
79+
assert.deepEqual(
8180
toMarkdown(
8281
{
8382
type: 'paragraph',
@@ -93,7 +92,7 @@ test('mdast -> markdown', (t) => {
9392
'should serialize strikethrough w/ eols'
9493
)
9594

96-
t.equal(
95+
assert.equal(
9796
toMarkdown(
9897
{
9998
type: 'paragraph',
@@ -111,7 +110,7 @@ test('mdast -> markdown', (t) => {
111110
'should not escape tildes in a `destinationLiteral`'
112111
)
113112

114-
t.equal(
113+
assert.equal(
115114
toMarkdown(
116115
{
117116
type: 'paragraph',
@@ -129,7 +128,7 @@ test('mdast -> markdown', (t) => {
129128
'should not escape tildes in a `destinationRaw`'
130129
)
131130

132-
t.equal(
131+
assert.equal(
133132
toMarkdown(
134133
{
135134
type: 'paragraph',
@@ -148,7 +147,7 @@ test('mdast -> markdown', (t) => {
148147
'should not escape tildes in a `reference`'
149148
)
150149

151-
t.equal(
150+
assert.equal(
152151
toMarkdown(
153152
{
154153
type: 'paragraph',
@@ -167,7 +166,7 @@ test('mdast -> markdown', (t) => {
167166
'should not escape tildes in a `title` (double quotes)'
168167
)
169168

170-
t.equal(
169+
assert.equal(
171170
toMarkdown(
172171
{
173172
type: 'paragraph',
@@ -188,6 +187,4 @@ test('mdast -> markdown', (t) => {
188187
"[](# '~a')\n",
189188
'should not escape tildes in a `title` (single quotes)'
190189
)
191-
192-
t.end()
193190
})

0 commit comments

Comments
 (0)