Skip to content

Instantly share code, notes, and snippets.

@TsuyoshiUshio
Created July 29, 2019 18:20
Show Gist options
  • Save TsuyoshiUshio/5b25cd8c78a13fbee73c58ba558e43a0 to your computer and use it in GitHub Desktop.
Save TsuyoshiUshio/5b25cd8c78a13fbee73c58ba558e43a0 to your computer and use it in GitHub Desktop.
Assert your self
describe('CommentPRTask Test', function () {
it('run all inputs function', async () => {
let factoryMock: IClientFactory = new ClientFactoryMock();
variables["Build.Repository.ID"] = '3';
variables['System.PullRequest.PullRequestId'] = '4';
inputs['AzureDevOpsService'] = 'devopspat';
inputs['Comment'] = 'foo';
let commentTask = new CreatePRCommentTask(factoryMock);
await commentTask.run();
(factoryMock as ClientFactoryMock).called.should.be.true;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment