Fixup
Co-authored-by: Fredrik Adelöw <freben@gmail.com> Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -121,7 +121,6 @@ describe('CatalogImportClient', () => {
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.restoreAllMocks();
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ describe('fetch:rails', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
mockFs({ [`${mockContext.workspacePath}/result`]: {} });
|
||||
jest.restoreAllMocks();
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
@@ -62,7 +62,7 @@ describe('publish:azure', () => {
|
||||
(WebApi as unknown as jest.Mock).mockImplementation(() => mockGitApi);
|
||||
|
||||
beforeEach(() => {
|
||||
jest.restoreAllMocks();
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
it('should throw an error when the repoUrl is not well formed', async () => {
|
||||
@@ -183,7 +183,12 @@ describe('publish:azure', () => {
|
||||
id: '709e891c-dee7-4f91-b963-534713c0737f',
|
||||
}));
|
||||
|
||||
await action.handler(mockContext);
|
||||
await action.handler({
|
||||
...mockContext,
|
||||
input: {
|
||||
repoUrl: 'dev.azure.com?repo=bob&owner=owner&organization=org',
|
||||
},
|
||||
});
|
||||
|
||||
expect(WebApi).toHaveBeenCalledWith(
|
||||
'https://dev.azure.com/org',
|
||||
@@ -234,7 +239,7 @@ describe('publish:azure', () => {
|
||||
expect(initRepoAndPush).toHaveBeenCalledWith({
|
||||
dir: mockContext.workspacePath,
|
||||
remoteUrl: 'https://dev.azure.com/organization/project/_git/repo',
|
||||
defaultBranch: 'master',
|
||||
defaultBranch: 'main',
|
||||
auth: { username: 'notempty', password: 'tokenlols' },
|
||||
logger: mockContext.logger,
|
||||
commitMessage: 'initial commit',
|
||||
|
||||
Reference in New Issue
Block a user