mirror of
https://github.com/actions/labeler.git
synced 2025-12-10 11:41:56 +00:00
Bring test I accidently deleted
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user