mirror of
https://github.com/SomboChea/ui
synced 2026-01-18 17:16:00 +07:00
fix: improve jest mock typings
This commit is contained in:
committed by
antoinechalifour
parent
b1804d7644
commit
852f6eeb22
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { ActionBar } from './ActionBar';
|
||||
|
||||
const mockPackageMeta = jest.fn(() => ({
|
||||
const mockPackageMeta: jest.Mock = jest.fn(() => ({
|
||||
latest: {
|
||||
homepage: 'https://verdaccio.tld',
|
||||
bugs: {
|
||||
@@ -32,7 +32,6 @@ describe('<ActionBar /> component', () => {
|
||||
});
|
||||
|
||||
test('when there is no action bar data', () => {
|
||||
// @ts-ignore
|
||||
mockPackageMeta.mockImplementation(() => ({
|
||||
latest: {},
|
||||
}));
|
||||
@@ -44,7 +43,6 @@ describe('<ActionBar /> component', () => {
|
||||
});
|
||||
|
||||
test('when there is a button to download a tarball', () => {
|
||||
// @ts-ignore
|
||||
mockPackageMeta.mockImplementation(() => ({
|
||||
latest: {
|
||||
dist: {
|
||||
|
||||
Reference in New Issue
Block a user