Skip to content

Commit 3352df1

Browse files
committed
Bring test I accidently deleted
1 parent 57d3407 commit 3352df1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

__tests__/main.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,20 @@ describe('run', () => {
168168
});
169169
});
170170

171+
it('can support multiple branches by providing an array', async () => {
172+
github.context.payload.pull_request!.head = {ref: 'array/123'};
173+
usingLabelerConfigYaml('branches.yml');
174+
await run();
175+
176+
expect(addLabelsMock).toHaveBeenCalledTimes(1);
177+
expect(addLabelsMock).toHaveBeenCalledWith({
178+
owner: 'monalisa',
179+
repo: 'helloworld',
180+
issue_number: 123,
181+
labels: ['array-branch']
182+
});
183+
});
184+
171185
it('adds a label when matching any and all patterns are provided', async () => {
172186
usingLabelerConfigYaml('any_and_all.yml');
173187
mockGitHubResponseChangedFiles('tests/test.ts');

0 commit comments

Comments
 (0)