Skip to content

Commit 0409b6a

Browse files
committed
Use Node test runner
1 parent 238e6e4 commit 0409b6a

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-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: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,12 @@
4040
},
4141
"devDependencies": {
4242
"@types/mdast": "^3.0.0",
43-
"@types/tape": "^4.0.0",
43+
"@types/node": "^18.0.0",
4444
"c8": "^7.0.0",
4545
"mdast-util-from-markdown": "^1.0.0",
4646
"prettier": "^2.0.0",
4747
"remark-cli": "^11.0.0",
4848
"remark-preset-wooorm": "^9.0.0",
49-
"tape": "^5.0.0",
5049
"tsd": "^0.25.0",
5150
"type-coverage": "^2.0.0",
5251
"typescript": "^4.0.0",
@@ -55,7 +54,7 @@
5554
},
5655
"scripts": {
5756
"prepack": "npm run build && npm run format",
58-
"build": "tsc --build --clean && tsc --build && type-coverage",
57+
"build": "tsc --build --clean && tsc --build && tsd && type-coverage",
5958
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
6059
"test-api": "node --conditions development test.js",
6160
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",

test.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
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 {u} from 'unist-builder'
45
import {removePosition} from './index.js'
56

6-
test('removePosition()', (t) => {
7+
test('removePosition()', () => {
78
const empty = {position: undefined}
89

9-
t.same(
10+
assert.deepEqual(
1011
removePosition(fromMarkdown('Some **strong**, _emphasis_, and `code`.')),
1112
u('root', empty, [
1213
u('paragraph', empty, [
@@ -22,7 +23,7 @@ test('removePosition()', (t) => {
2223
'should work softly'
2324
)
2425

25-
t.same(
26+
assert.deepEqual(
2627
removePosition(
2728
fromMarkdown('Some **strong**, _emphasis_, and `code`.'),
2829
true
@@ -40,6 +41,4 @@ test('removePosition()', (t) => {
4041
]),
4142
'should work by force'
4243
)
43-
44-
t.end()
4544
})

0 commit comments

Comments
 (0)