From 0a1f3e223426d677172b4ff0f49012fb28c1505b Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 6 Feb 2023 14:55:17 +0100 Subject: [PATCH] Use Node test runner --- package.json | 5 ++--- test.js | 9 ++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index bbb5ba0..295796c 100644 --- a/package.json +++ b/package.json @@ -39,16 +39,15 @@ "dependencies": { "@types/eslint": "^8.0.0", "vfile": "^5.0.0", + "vfile-message": "^3.0.0", "vfile-statistics": "^2.0.0" }, "devDependencies": { - "@types/tape": "^4.0.0", + "@types/node": "^18.0.0", "c8": "^7.0.0", "prettier": "^2.0.0", "remark-cli": "^11.0.0", "remark-preset-wooorm": "^9.0.0", - "rimraf": "^3.0.0", - "tape": "^5.0.0", "type-coverage": "^2.0.0", "typescript": "^4.0.0", "xo": "^0.53.0" diff --git a/test.js b/test.js index d52a37f..4c07eb1 100644 --- a/test.js +++ b/test.js @@ -1,8 +1,9 @@ -import test from 'tape' +import assert from 'node:assert/strict' +import test from 'node:test' import {VFile} from 'vfile' import {toESLint} from './index.js' -test('toESLint', (t) => { +test('toESLint', () => { const file = new VFile({path: '~/example.md'}) const message = file.info('?') @@ -26,7 +27,7 @@ test('toESLint', (t) => { }) } catch {} - t.deepEqual(toESLint([file]), [ + assert.deepEqual(toESLint([file]), [ { filePath: '~/example.md', messages: [ @@ -80,6 +81,4 @@ test('toESLint', (t) => { suppressedMessages: [] } ]) - - t.end() })