Skip to content

Commit 779ba84

Browse files
committed
Use Node test runner
1 parent e09f748 commit 779ba84

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"mdast-util-to-markdown": "^1.0.0"
4949
},
5050
"devDependencies": {
51-
"@types/tape": "^4.0.0",
51+
"@types/node": "^18.0.0",
5252
"c8": "^7.0.0",
5353
"github-slugger": "^2.0.0",
5454
"hast-util-to-html": "^8.0.0",
@@ -58,8 +58,6 @@
5858
"prettier": "^2.0.0",
5959
"remark-cli": "^11.0.0",
6060
"remark-preset-wooorm": "^9.0.0",
61-
"rimraf": "^3.0.0",
62-
"tape": "^5.0.0",
6361
"type-coverage": "^2.0.0",
6462
"typescript": "^4.0.0",
6563
"xo": "^0.53.0"

test/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import assert from 'node:assert/strict'
22
import fs from 'node:fs/promises'
3-
import test from 'tape'
3+
import test from 'node:test'
44
import {slug} from 'github-slugger'
55
import {toHast} from 'mdast-util-to-hast'
66
import {toHtml} from 'hast-util-to-html'
@@ -10,7 +10,7 @@ import {gfm} from 'micromark-extension-gfm'
1010
import {gfmFromMarkdown, gfmToMarkdown} from '../index.js'
1111
import {spec} from './spec.js'
1212

13-
test('markdown -> mdast', async (t) => {
13+
test('markdown -> mdast', async () => {
1414
const files = spec.filter(
1515
(example) => !/disallowed raw html/i.test(example.category)
1616
)
@@ -54,17 +54,15 @@ test('markdown -> mdast', async (t) => {
5454
await fs.writeFile(inputUrl, expectedMarkdown)
5555
}
5656

57-
t.deepEqual(
57+
assert.equal(
5858
actualHtml,
5959
expectedHtml,
6060
example.category + ' (' + index + ') -> html'
6161
)
62-
t.equal(
62+
assert.equal(
6363
actualMarkdown,
6464
expectedMarkdown,
6565
example.category + ' (' + index + ') -> md'
6666
)
6767
}
68-
69-
t.end()
7068
})

0 commit comments

Comments
 (0)