Skip to content

Commit 14376e7

Browse files
committed
Use Node test runner
1 parent 2208b4b commit 14376e7

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
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/hydrogen
2121
- node

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,11 @@
3737
"hast-util-is-element": "^2.0.0"
3838
},
3939
"devDependencies": {
40-
"@types/tape": "^4.0.0",
40+
"@types/node": "^18.0.0",
4141
"c8": "^7.0.0",
4242
"prettier": "^2.0.0",
4343
"remark-cli": "^11.0.0",
4444
"remark-preset-wooorm": "^9.0.0",
45-
"tape": "^5.0.0",
4645
"type-coverage": "^2.0.0",
4746
"typescript": "^4.0.0",
4847
"xo": "^0.53.0"

test.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1-
import test from 'tape'
1+
import assert from 'node:assert/strict'
2+
import test from 'node:test'
23
import {scriptSupporting} from './index.js'
34

4-
test('scriptSupporting', (t) => {
5-
t.equal(scriptSupporting(), false, 'should return `false` without node')
5+
test('scriptSupporting', () => {
6+
assert.equal(scriptSupporting(), false, 'should return `false` without node')
67

7-
t.equal(scriptSupporting(null), false, 'should return `false` with `null`')
8+
assert.equal(
9+
scriptSupporting(null),
10+
false,
11+
'should return `false` with `null`'
12+
)
813

9-
t.equal(
14+
assert.equal(
1015
scriptSupporting({type: 'text'}),
1116
false,
1217
'should return `false` when without `element`'
1318
)
1419

15-
t.equal(
20+
assert.equal(
1621
scriptSupporting({type: 'element'}),
1722
false,
1823
'should return `false` when with invalid `element`'
1924
)
2025

21-
t.equal(
26+
assert.equal(
2227
scriptSupporting({
2328
type: 'element',
2429
tagName: 'a',
@@ -29,7 +34,7 @@ test('scriptSupporting', (t) => {
2934
'should return `false` when without not script-supporting'
3035
)
3136

32-
t.equal(
37+
assert.equal(
3338
scriptSupporting({
3439
type: 'element',
3540
tagName: 'template',
@@ -38,6 +43,4 @@ test('scriptSupporting', (t) => {
3843
true,
3944
'should return `true` when with script-supporting'
4045
)
41-
42-
t.end()
4346
})

0 commit comments

Comments
 (0)