insomnia/packages/insomnia-app/app/__mocks__/isomorphic-git.ts
Dimitri Mitropoulos 5f4c19da35
[TypeScript] Phase 1 & 2 (#3370)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-05-12 18:35:00 +12:00

13 lines
419 B
TypeScript

// eslint-disable-next-line filenames/match-exported
const git = jest.requireActual('isomorphic-git');
const mock = jest.genMockFromModule('isomorphic-git');
// @ts-expect-error -- TSCONVERSION
git.push = mock.push;
// @ts-expect-error -- TSCONVERSION
git.clone = mock.clone;
// WARNING: changing this to `export default` will break the mock and be incredibly hard to debug. Ask me how I know.
module.exports = git;