Skip to content

Commit d1975d3

Browse files
committed
Use Node test runner
1 parent 2cbeefd commit d1975d3

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-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
@@ -33,12 +33,11 @@
3333
"vscode-languageserver-types": "^3.0.0"
3434
},
3535
"devDependencies": {
36-
"@types/tape": "^4.0.0",
36+
"@types/node": "^18.0.0",
3737
"c8": "^7.0.0",
3838
"prettier": "^2.0.0",
3939
"remark-cli": "^11.0.0",
4040
"remark-preset-wooorm": "^9.0.0",
41-
"tape": "^5.0.0",
4241
"type-coverage": "^2.0.0",
4342
"typescript": "^4.0.0",
4443
"xo": "^0.53.0"

test/index.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1+
import assert from 'node:assert/strict'
2+
import test from 'node:test'
13
import {toPoint, toPosition, fromPoint, fromPosition} from 'unist-util-lsp'
2-
import test from 'tape'
34

4-
test('fromPoint', async (t) => {
5-
t.deepEqual(
5+
test('fromPoint', async () => {
6+
assert.deepEqual(
67
fromPoint({line: 43, column: 100}),
78
{line: 42, character: 99},
89
'should convert unist points to LSP positions'
910
)
1011
})
1112

12-
test('toPoint', async (t) => {
13-
t.deepEqual(
13+
test('toPoint', async () => {
14+
assert.deepEqual(
1415
toPoint({line: 43, character: 100}),
1516
{line: 44, column: 101},
1617
'should convert LSP positions to unist points'
1718
)
1819
})
1920

20-
test('fromPosition', async (t) => {
21-
t.deepEqual(
21+
test('fromPosition', async () => {
22+
assert.deepEqual(
2223
fromPosition({
2324
start: {line: 1, column: 2},
2425
end: {line: 3, column: 4}
@@ -31,8 +32,8 @@ test('fromPosition', async (t) => {
3132
)
3233
})
3334

34-
test('toPosition', async (t) => {
35-
t.deepEqual(
35+
test('toPosition', async () => {
36+
assert.deepEqual(
3637
toPosition({
3738
start: {line: 0, character: 1},
3839
end: {line: 2, character: 3}

0 commit comments

Comments
 (0)