Skip to content
Snippets Groups Projects
Unverified Commit 700fa4d1 authored by Tobias's avatar Tobias Committed by GitHub
Browse files

test(git-refs/git-tags): add types to mocked objects (#23096)

parent 6e0b9e47
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ import { add, clear } from '../../../util/host-rules'; ...@@ -5,7 +5,7 @@ import { add, clear } from '../../../util/host-rules';
import { GitRefsDatasource } from '.'; import { GitRefsDatasource } from '.';
jest.mock('simple-git'); jest.mock('simple-git');
const simpleGitFactoryMock = simpleGit as jest.Mock; const simpleGitFactoryMock = simpleGit as jest.Mock<Partial<SimpleGit>>;
const packageName = 'https://github.com/example/example.git'; const packageName = 'https://github.com/example/example.git';
...@@ -14,7 +14,7 @@ const lsRemote1 = Fixtures.get('ls-remote-1.txt'); ...@@ -14,7 +14,7 @@ const lsRemote1 = Fixtures.get('ls-remote-1.txt');
const datasource = GitRefsDatasource.id; const datasource = GitRefsDatasource.id;
describe('modules/datasource/git-refs/index', () => { describe('modules/datasource/git-refs/index', () => {
let gitMock: any; let gitMock: jest.MockedObject<Pick<SimpleGit, 'env' | 'listRemote'>>;
beforeEach(() => { beforeEach(() => {
// clear host rules // clear host rules
......
...@@ -5,7 +5,7 @@ import { add, clear } from '../../../util/host-rules'; ...@@ -5,7 +5,7 @@ import { add, clear } from '../../../util/host-rules';
import { GitTagsDatasource } from '.'; import { GitTagsDatasource } from '.';
jest.mock('simple-git'); jest.mock('simple-git');
const simpleGitFactoryMock = simpleGit as jest.Mock; const simpleGitFactoryMock = simpleGit as jest.Mock<Partial<SimpleGit>>;
const packageName = 'https://github.com/example/example.git'; const packageName = 'https://github.com/example/example.git';
...@@ -15,7 +15,7 @@ const datasource = GitTagsDatasource.id; ...@@ -15,7 +15,7 @@ const datasource = GitTagsDatasource.id;
const datasourceInstance = new GitTagsDatasource(); const datasourceInstance = new GitTagsDatasource();
describe('modules/datasource/git-tags/index', () => { describe('modules/datasource/git-tags/index', () => {
let gitMock: any; let gitMock: jest.MockedObject<Pick<SimpleGit, 'env' | 'listRemote'>>;
beforeEach(() => { beforeEach(() => {
// clear host rules // clear host rules
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment