Replace path.resolve with pathToFileURL

This commit is contained in:
freearhey committed 2025-01-05 20:10:11 +03:00
1 parent e7bbc7db23
commit e15d812750
5 files changed
+10 -9

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
import { execSync } from 'child_process'
import fs from 'fs-extra'
import path from 'path'
import { pathToFileURL } from 'node:url'
beforeEach(() => {
fs.emptyDirSync('tests/__data__/output')
@@ -24,7 +24,7 @@ describe('channels:parse', () => {
})
function content(filepath: string) {
return fs.readFileSync(path.resolve(filepath), {
return fs.readFileSync(pathToFileURL(filepath), {
encoding: 'utf8'
})
}