Skip to content

Commit dee71ea

Browse files
committed
Use Node test runner
1 parent 65451d5 commit dee71ea

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
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
@@ -32,12 +32,11 @@
3232
"index.js"
3333
],
3434
"devDependencies": {
35-
"@types/tape": "^4.0.0",
35+
"@types/node": "^18.0.0",
3636
"c8": "^7.0.0",
3737
"prettier": "^2.0.0",
3838
"remark-cli": "^11.0.0",
3939
"remark-preset-wooorm": "^9.0.0",
40-
"tape": "^5.0.0",
4140
"type-coverage": "^2.0.0",
4241
"typescript": "^4.0.0",
4342
"xo": "^0.53.0"

test.js

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

4-
test('generated', (t) => {
5-
t.equal(generated(), true, 'should not throw without node')
5+
test('generated', () => {
6+
assert.equal(generated(), true, 'should not throw without node')
67

7-
t.equal(
8+
assert.equal(
89
generated({
910
position: {
1011
start: {
@@ -23,21 +24,19 @@ test('generated', (t) => {
2324
'should return false when with properties'
2425
)
2526

26-
t.equal(
27+
assert.equal(
2728
generated({
2829
position: {start: {}, end: {}}
2930
}),
3031
true,
3132
'should return true when without properties'
3233
)
3334

34-
t.equal(
35+
assert.equal(
3536
generated({position: {}}),
3637
true,
3738
'should return true when without objects'
3839
)
3940

40-
t.equal(generated({}), true, 'should return true when without position')
41-
42-
t.end()
41+
assert.equal(generated({}), true, 'should return true when without position')
4342
})

0 commit comments

Comments
 (0)