diff --git a/.taprc b/.taprc deleted file mode 100644 index 20d7c75..0000000 --- a/.taprc +++ /dev/null @@ -1,9 +0,0 @@ -ts: false -jsx: false -flow: false -check-coverage: false -coverage: false -timeout: 120000 - -files: - - 'build/**/*.test.js' diff --git a/src/__test__/HTMLValidatorCommand.test.ts b/src/__test__/HTMLValidatorCommand.test.ts index fa0d46d..5031ae8 100644 --- a/src/__test__/HTMLValidatorCommand.test.ts +++ b/src/__test__/HTMLValidatorCommand.test.ts @@ -1,21 +1,23 @@ -import tap from 'tap' +import test from 'node:test' +import assert from 'node:assert/strict' + import { execa } from 'execa' import { cli } from '../cli.js' import { HTMLValidatorCommand } from '../HTMLValidatorCommand.js' -await tap.test('html-w3c-validator', async (t) => { - await t.test('should be instance of the command', async (t) => { +await test('html-w3c-validator', async (t) => { + await t.test('should be instance of the command', async () => { const command = cli.process([]) - t.equal(command instanceof HTMLValidatorCommand, true) + assert(command instanceof HTMLValidatorCommand) }) - await t.test('succeeds and validate the html correctly', async (t) => { + await t.test('succeeds and validate the html correctly', async () => { const exampleURL = new URL('../../example', import.meta.url) process.chdir(exampleURL.pathname) await execa('rimraf', ['node_modules']) await execa('npm', ['install']) const { exitCode } = await execa('npm', ['run', 'test:html-w3c-validator']) - t.equal(exitCode, 0) + assert.strictEqual(exitCode, 0) }) }) diff --git a/src/utils/__test__/isExistingPath.test.ts b/src/utils/__test__/isExistingPath.test.ts index d59c232..e45c205 100644 --- a/src/utils/__test__/isExistingPath.test.ts +++ b/src/utils/__test__/isExistingPath.test.ts @@ -1,9 +1,11 @@ +import test from 'node:test' +import assert from 'node:assert/strict' + import fsMock from 'mock-fs' -import tap from 'tap' import { isExistingPath } from '../isExistingPath.js' -await tap.test('utils/isExistingPath', async (t) => { +await test('utils/isExistingPath', async (t) => { t.afterEach(() => { fsMock.restore() }) @@ -12,13 +14,13 @@ await tap.test('utils/isExistingPath', async (t) => { fsMock({ '/file.txt': '' }) - t.equal(await isExistingPath('/file.txt'), true) + assert.strictEqual(await isExistingPath('/file.txt'), true) }) await t.test("should return false if the file doesn't exists", async () => { fsMock({ '/file.txt': '' }) - t.equal(await isExistingPath('/randomfile.txt'), false) + assert.strictEqual(await isExistingPath('/randomfile.txt'), false) }) })