Skip to content

Commit

Permalink
Bring test I accidently deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdales committed May 17, 2023
1 parent 57d3407 commit 3352df1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,20 @@ describe('run', () => {
});
});

it('can support multiple branches by providing an array', async () => {
github.context.payload.pull_request!.head = {ref: 'array/123'};
usingLabelerConfigYaml('branches.yml');
await run();

expect(addLabelsMock).toHaveBeenCalledTimes(1);
expect(addLabelsMock).toHaveBeenCalledWith({
owner: 'monalisa',
repo: 'helloworld',
issue_number: 123,
labels: ['array-branch']
});
});

it('adds a label when matching any and all patterns are provided', async () => {
usingLabelerConfigYaml('any_and_all.yml');
mockGitHubResponseChangedFiles('tests/test.ts');
Expand Down

0 comments on commit 3352df1

Please sign in to comment.