Fix mock in createRamaProxy.spec.js

This commit is contained in:
Sander Declerck 2026-05-08 16:30:04 +02:00
parent 023deff926
commit 5a3df40ee5
No known key found for this signature in database

View file

@ -24,6 +24,7 @@ mock.module("node:child_process", {
}); });
const mockExistsSync = mock.fn(() => true); const mockExistsSync = mock.fn(() => true);
const mockWriteFile = mock.fn(() => {});
const mockMkdtempSync = mock.fn(() => "/tmp/safe-chain-proxy-abc"); const mockMkdtempSync = mock.fn(() => "/tmp/safe-chain-proxy-abc");
const mockReadFile = mock.fn( const mockReadFile = mock.fn(
(/** @type {string} */ path, /** @type {string} */ _encoding, /** @type {Function} */ cb) => { (/** @type {string} */ path, /** @type {string} */ _encoding, /** @type {Function} */ cb) => {
@ -42,6 +43,7 @@ mock.module("node:fs", {
existsSync: mockExistsSync, existsSync: mockExistsSync,
mkdtempSync: mockMkdtempSync, mkdtempSync: mockMkdtempSync,
readFile: mockReadFile, readFile: mockReadFile,
writeFile: mockWriteFile,
}, },
}); });
@ -53,6 +55,8 @@ mock.module("../../config/settings.js", {
namedExports: { namedExports: {
getLoggingLevel: mock.fn(() => "default"), getLoggingLevel: mock.fn(() => "default"),
LOGGING_VERBOSE: "verbose", LOGGING_VERBOSE: "verbose",
getMinimumPackageAgeHours: () => 48,
skipMinimumPackageAge: () => false,
}, },
}); });