diff --git a/test/datasource/git-tags.spec.ts b/test/datasource/git-tags.spec.ts index 7825d7490822106428402387cfdf023479f27a69..c4a447da9bf85bc8f8330cb9b7032c7bc4a3c8a4 100644 --- a/test/datasource/git-tags.spec.ts +++ b/test/datasource/git-tags.spec.ts @@ -1,7 +1,7 @@ import _simpleGit from 'simple-git/promise'; import { getPkgReleases } from '../../lib/datasource/git-tags'; -jest.mock('simple-git/promise.js'); +jest.mock('simple-git/promise'); const simpleGit: any = _simpleGit; // const lookupName = 'vapor'; diff --git a/test/datasource/orb.spec.ts b/test/datasource/orb.spec.ts index 6e3227cc9b555e4d43d1627637422c21d539e1ae..4db9ad0bf93cb1ba348a386e09fe77d8210c226f 100644 --- a/test/datasource/orb.spec.ts +++ b/test/datasource/orb.spec.ts @@ -2,9 +2,6 @@ import _got from '../../lib/util/got'; import * as datasource from '../../lib/datasource'; jest.mock('../../lib/util/got'); -jest.mock('simple-git', () => { - throw new Error('Test'); -}); const got: any = _got; diff --git a/test/platform/git/storage.spec.ts b/test/platform/git/storage.spec.ts index e4dfefbb6c7ba59a8d1ce22c9f972cf6176a95ec..d8ad8dde3b9eee63278fd22ae920fc2efaea32f0 100644 --- a/test/platform/git/storage.spec.ts +++ b/test/platform/git/storage.spec.ts @@ -57,14 +57,14 @@ describe('platform/git/storage', () => { }); }); - afterEach(() => { - tmpDir.cleanup(); - origin.cleanup(); + afterEach(async () => { + await tmpDir.cleanup(); + await origin.cleanup(); git.cleanRepo(); }); - afterAll(() => { - base.cleanup(); + afterAll(async () => { + await base.cleanup(); }); describe('setBaseBranch(branchName)', () => { @@ -96,7 +96,7 @@ describe('platform/git/storage', () => { }); expect(await fs.exists(tmpDir.path + '/.gitmodules')).toBeTruthy(); expect(await git.getFileList()).toMatchSnapshot(); - repo.reset(['--hard', 'HEAD^']); + await repo.reset(['--hard', 'HEAD^']); }); }); describe('branchExists(branchName)', () => { @@ -370,7 +370,7 @@ describe('platform/git/storage', () => { url: base.path, }); expect(await fs.exists(tmpDir.path + '/.gitmodules')).toBeTruthy(); - repo.reset(['--hard', 'HEAD^']); + await repo.reset(['--hard', 'HEAD^']); }); }); });