diff --git a/src/test/mocks/cockpit/cockpitFile.ts b/src/test/mocks/cockpit/cockpitFile.ts index 731b575a..cbd8be1f 100644 --- a/src/test/mocks/cockpit/cockpitFile.ts +++ b/src/test/mocks/cockpit/cockpitFile.ts @@ -32,7 +32,7 @@ export const getLastBlueprintReq = () => { return lastRequest.blueprints[lastRequest.blueprints.length - 1]; }; -export const cockpitFile = (filepath: string) => { +export const cockpitFile = (filepath: string, options?: object) => { return { read: (): Promise => { const file = path.parse(filepath); @@ -52,5 +52,10 @@ export const cockpitFile = (filepath: string) => { lastRequest.blueprints.push(contents); } }, + modify: (callback: (contents: string) => string): Promise => { + return new Promise((resolve) => { + resolve(callback('')); + }); + }, }; };