Skip to content

Commit 99e6d75

Browse files
committed
Fix test file imports
- Add missing safeDelete and safeDeleteSync imports in fs.test.ts - Fix temp-file-helper import to include .mjs extension Resolves TypeScript and runtime import errors.
1 parent 6352827 commit 99e6d75

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

test/registry/fs.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import {
1919
readFileUtf8Sync,
2020
readJson,
2121
readJsonSync,
22+
safeDelete,
23+
safeDeleteSync,
2224
safeReadFile,
2325
safeReadFileSync,
2426
safeStats,
@@ -28,7 +30,7 @@ import {
2830
writeJsonSync,
2931
} from '@socketsecurity/lib/fs'
3032
import { describe, expect, it } from 'vitest'
31-
import { runWithTempDir } from '../utils/temp-file-helper'
33+
import { runWithTempDir } from '../utils/temp-file-helper.mjs'
3234

3335
describe('fs', () => {
3436
describe('findUp', () => {
@@ -1118,7 +1120,9 @@ describe('fs', () => {
11181120

11191121
await writeJson(testFile, testData, {
11201122
replacer: (key, value) => {
1121-
if (key === 'secret') return undefined
1123+
if (key === 'secret') {
1124+
return undefined
1125+
}
11221126
return value
11231127
},
11241128
})

test/registry/ipc.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
writeIpcStub,
1818
} from '@socketsecurity/lib/ipc'
1919
import { describe, expect, it } from 'vitest'
20-
import { runWithTempDir } from '../utils/temp-file-helper'
20+
import { runWithTempDir } from '../utils/temp-file-helper.mjs'
2121

2222
describe('ipc', () => {
2323
describe('createIpcChannelId', () => {

0 commit comments

Comments
 (0)