24 lines
373 B
JavaScript
24 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(),
|
||
|
}
|
||
|
}
|