linting
This commit is contained in:
@@ -646,7 +646,9 @@ describe('rmRF', () => {
|
||||
// Node.js 24 changed behavior - fs.readlink no longer includes trailing backslash
|
||||
// Accept both formats for compatibility
|
||||
const linkPath = await fs.readlink(symlinkLevel2Directory)
|
||||
expect(linkPath.replace(/\\+$/, '')).toBe(symlinkDirectory.replace(/\\+$/, ''))
|
||||
expect(linkPath.replace(/\\+$/, '')).toBe(
|
||||
symlinkDirectory.replace(/\\+$/, '')
|
||||
)
|
||||
} else {
|
||||
expect(await fs.readlink(symlinkLevel2Directory)).toBe(symlinkDirectory)
|
||||
}
|
||||
@@ -1202,9 +1204,8 @@ describe('which', () => {
|
||||
const originalPath = process.env['PATH']
|
||||
try {
|
||||
// modify PATH
|
||||
process.env[
|
||||
'PATH'
|
||||
] = `${process.env['PATH']}${path.delimiter}${testPath}`
|
||||
process.env['PATH'] =
|
||||
`${process.env['PATH']}${path.delimiter}${testPath}`
|
||||
|
||||
// find each file
|
||||
for (const fileName of Object.keys(files)) {
|
||||
@@ -1275,9 +1276,8 @@ describe('which', () => {
|
||||
await fs.writeFile(notExpectedFilePath, '')
|
||||
const originalPath = process.env['PATH']
|
||||
try {
|
||||
process.env[
|
||||
'PATH'
|
||||
] = `${process.env['PATH']}${path.delimiter}${testPath}`
|
||||
process.env['PATH'] =
|
||||
`${process.env['PATH']}${path.delimiter}${testPath}`
|
||||
expect(await io.which(fileName)).toBe(expectedFilePath)
|
||||
} finally {
|
||||
process.env['PATH'] = originalPath
|
||||
@@ -1439,9 +1439,8 @@ describe('findInPath', () => {
|
||||
try {
|
||||
// update the PATH
|
||||
for (const testPath of testPaths) {
|
||||
process.env[
|
||||
'PATH'
|
||||
] = `${process.env['PATH']}${path.delimiter}${testPath}`
|
||||
process.env['PATH'] =
|
||||
`${process.env['PATH']}${path.delimiter}${testPath}`
|
||||
}
|
||||
// exact file names
|
||||
expect(await io.findInPath(fileName)).toEqual(filePaths)
|
||||
|
||||
Reference in New Issue
Block a user