forked from sombochea/verdaccio-ui
fix: improve jest mock typings
This commit is contained in:
committed by
antoinechalifour
parent
b1804d7644
commit
852f6eeb22
@@ -4,7 +4,7 @@ import Repository from './Repository';
|
||||
|
||||
jest.mock('./img/git.png', () => '');
|
||||
|
||||
const mockPackageMeta = jest.fn(() => ({
|
||||
const mockPackageMeta: jest.Mock = jest.fn(() => ({
|
||||
latest: {
|
||||
homepage: 'https://verdaccio.tld',
|
||||
bugs: {
|
||||
@@ -37,7 +37,6 @@ describe('<Repository /> component', () => {
|
||||
},
|
||||
};
|
||||
|
||||
// @ts-ignore
|
||||
mockPackageMeta.mockImplementation(() => packageMeta);
|
||||
|
||||
const wrapper = mount(<Repository />);
|
||||
@@ -49,7 +48,6 @@ describe('<Repository /> component', () => {
|
||||
latest: {},
|
||||
};
|
||||
|
||||
// @ts-ignore
|
||||
mockPackageMeta.mockImplementation(() => packageMeta);
|
||||
|
||||
const wrapper = mount(<Repository />);
|
||||
@@ -66,7 +64,6 @@ describe('<Repository /> component', () => {
|
||||
},
|
||||
};
|
||||
|
||||
// @ts-ignore
|
||||
mockPackageMeta.mockImplementation(() => packageMeta);
|
||||
|
||||
const wrapper = mount(<Repository />);
|
||||
|
||||
Reference in New Issue
Block a user