diff --git a/__mocks__/fs/promises.js b/__mocks__/fs/promises.js deleted file mode 100644 index 1a58f0f013ac..000000000000 --- a/__mocks__/fs/promises.js +++ /dev/null @@ -1,3 +0,0 @@ -const {fs} = require('memfs'); - -module.exports = fs.promises; diff --git a/__mocks__/fs/promises.ts b/__mocks__/fs/promises.ts new file mode 100644 index 000000000000..b831fffcefb8 --- /dev/null +++ b/__mocks__/fs/promises.ts @@ -0,0 +1,8 @@ +import {fs} from 'memfs'; +import type {FsPromisesApi} from 'memfs/lib/node/types'; + +type PromisesMock = FsPromisesApi; + +const promisesMock: PromisesMock = fs.promises; + +export default promisesMock;