fs-cache-fast/test/helper.mjs
Jonatan Nilsson e3a8f6496e
Some checks failed
/ deploy (push) Failing after 8s
first version
2024-09-20 13:40:01 +00:00

23 lines
373 B
JavaScript

import { spy } from 'eltro'
export function fakeFsSync() {
return {
mkdirSync: spy(),
readFileSync: spy(),
writeFileSync: spy(),
}
}
export function fakeFsPromises() {
return {
readFile: spy().resolves(),
writeFile: spy().resolves(),
}
}
export function fakeFs() {
return {
fsSync: fakeFsSync(),
fsPromises: fakeFsPromises(),
}
}