mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Fix mock in createRamaProxy.spec.js
This commit is contained in:
parent
023deff926
commit
5a3df40ee5
1 changed files with 4 additions and 0 deletions
|
|
@ -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,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue