diff --git a/.taprc b/.taprc deleted file mode 100644 index bd71b5a..0000000 --- a/.taprc +++ /dev/null @@ -1,8 +0,0 @@ -ts: false -jsx: false -flow: false -check-coverage: false -coverage: false - -files: - - 'test/**/*.test.js' diff --git a/test/basic.test.js b/test/basic.test.js index ed46ff6..efbc167 100644 --- a/test/basic.test.js +++ b/test/basic.test.js @@ -1,9 +1,11 @@ -const tap = require('tap') +const test = require('node:test') +const assert = require('node:assert/strict') + const { markdownlint } = require('markdownlint').promises const relativeLinks = require('../src/index.js') -tap.test('ensure we validate correctly', async (t) => { +test('ensure we validate correctly', async () => { const lintResults = await markdownlint({ files: ['test/fixtures/Valid.md', 'test/fixtures/Invalid.md'], config: { @@ -11,23 +13,23 @@ tap.test('ensure we validate correctly', async (t) => { }, customRules: [relativeLinks] }) - t.equal(lintResults['test/fixtures/Valid.md'].length, 0) - t.equal(lintResults['test/fixtures/Invalid.md'].length, 2) + assert.equal(lintResults['test/fixtures/Valid.md'].length, 0) + assert.equal(lintResults['test/fixtures/Invalid.md'].length, 2) - t.equal( + assert.equal( lintResults['test/fixtures/Invalid.md'][0]?.ruleDescription, 'Relative links should be valid' ) - t.equal( + assert.equal( lintResults['test/fixtures/Invalid.md'][0]?.errorDetail, 'Link "./basic.test.js" is dead' ) - t.equal( + assert.equal( lintResults['test/fixtures/Invalid.md'][1]?.ruleDescription, 'Relative links should be valid' ) - t.equal( + assert.equal( lintResults['test/fixtures/Invalid.md'][1]?.errorDetail, 'Link "../image.png" is dead' )