diff --git a/src/test/mocks/cockpit/fsinfo.ts b/src/test/mocks/cockpit/fsinfo.ts new file mode 100644 index 00000000..16779038 --- /dev/null +++ b/src/test/mocks/cockpit/fsinfo.ts @@ -0,0 +1,17 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ + +type fileinfo = { + entries?: Record; +}; + +export const fsinfo = ( + path: string, + attributes: (keyof fileinfo)[], + options: object +): Promise => { + return new Promise((resolve) => { + resolve({ + entries: {}, + }); + }); +}; diff --git a/src/test/mocks/cockpit/index.ts b/src/test/mocks/cockpit/index.ts new file mode 100644 index 00000000..fa6b414a --- /dev/null +++ b/src/test/mocks/cockpit/index.ts @@ -0,0 +1,25 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ + +type userinfo = { + home: string; +}; + +export default { + user: (): Promise => { + return new Promise((resolve) => { + resolve({ + home: '', + }); + }); + }, + file: (path: string) => { + return { + read: (): Promise => { + return new Promise((resolve) => { + resolve(''); + }); + }, + close: () => {}, + }; + }, +};