1
1
mirror of https://github.com/theoludwig/html-w3c-validator.git synced 2025-05-21 23:21:29 +02:00

chore: better Prettier config for easier reviews

This commit is contained in:
2023-10-23 23:21:05 +02:00
parent e3cd809e56
commit 02a5010340
20 changed files with 2487 additions and 2228 deletions

View File

@ -1,26 +1,26 @@
import test from 'node:test'
import assert from 'node:assert/strict'
import test from "node:test"
import assert from "node:assert/strict"
import fsMock from 'mock-fs'
import fsMock from "mock-fs"
import { isExistingPath } from '../isExistingPath.js'
import { isExistingPath } from "../isExistingPath.js"
await test('utils/isExistingPath', async (t) => {
await test("utils/isExistingPath", async (t) => {
t.afterEach(() => {
fsMock.restore()
})
await t.test('should return true if the file exists', async () => {
await t.test("should return true if the file exists", async () => {
fsMock({
'/file.txt': ''
"/file.txt": "",
})
assert.strictEqual(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': ''
"/file.txt": "",
})
assert.strictEqual(await isExistingPath('/randomfile.txt'), false)
assert.strictEqual(await isExistingPath("/randomfile.txt"), false)
})
})