mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
fix broken test case for newPackagesListCache
This commit is contained in:
parent
5b1cd7e8da
commit
10c078a993
1 changed files with 4 additions and 2 deletions
|
|
@ -163,8 +163,10 @@ describe("newPackagesListCache", () => {
|
|||
});
|
||||
|
||||
it("warns when writing fails", () => {
|
||||
// Point HOME at a non-existent path so the write will fail
|
||||
process.env.HOME = path.join(testHomeDir, "does-not-exist");
|
||||
// Place a regular file at the .safe-chain path so getSafeChainDirectory
|
||||
// returns it as-is (existsSync is true) but writing a child path fails.
|
||||
const safeChainPath = path.join(testHomeDir, ".safe-chain");
|
||||
fs.writeFileSync(safeChainPath, "not-a-directory");
|
||||
|
||||
writeNewPackagesListToLocalCache([], "etag-fail");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue