test(scaffolder-backend/azure): added a test for the new cojndif for azure:
This commit is contained in:
@@ -17,7 +17,7 @@ jest.mock('./helpers');
|
||||
|
||||
jest.mock('azure-devops-node-api', () => ({
|
||||
WebApi: jest.fn(),
|
||||
getPersonalAccessTokenHandler: jest.fn(),
|
||||
getPersonalAccessTokenHandler: jest.fn().mockReturnValue(() => {}),
|
||||
}));
|
||||
|
||||
import { AzurePublisher } from './azure';
|
||||
@@ -50,13 +50,18 @@ describe('Azure Publisher', () => {
|
||||
|
||||
const result = await publisher!.publish({
|
||||
values: {
|
||||
storePath: 'project/repo',
|
||||
storePath: 'https://dev.azure.com/organisation/project/_git/repo',
|
||||
owner: 'bob',
|
||||
},
|
||||
directory: '/tmp/test',
|
||||
logger,
|
||||
});
|
||||
|
||||
expect(WebApi).toHaveBeenCalledWith(
|
||||
'https://dev.azure.com/organisation',
|
||||
expect.any(Function),
|
||||
);
|
||||
|
||||
expect(result).toEqual({
|
||||
remoteUrl: 'https://dev.azure.com/organization/project/_git/repo',
|
||||
catalogInfoUrl:
|
||||
|
||||
Reference in New Issue
Block a user