From 7aadc17f94f6e78f42f72cac69a8c175e13b2f21 Mon Sep 17 00:00:00 2001 From: Josh Dales <30500472+joshdales@users.noreply.github.com> Date: Thu, 28 Oct 2021 22:33:25 -0400 Subject: [PATCH] Update the tests for applying multiple branch based labels --- __tests__/fixtures/branches.yml | 4 ++-- __tests__/main.test.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/__tests__/fixtures/branches.yml b/__tests__/fixtures/branches.yml index 30bbbb39..57369f42 100644 --- a/__tests__/fixtures/branches.yml +++ b/__tests__/fixtures/branches.yml @@ -1,5 +1,5 @@ test-branch: - - branch: "test/*" + - branch: "test/**" feature-branch: - branch: "*/feature/*" @@ -8,4 +8,4 @@ bug-branch: - branch: "{bug,fix}/*" array-branch: - - branch: ["array/*", "*/array/*"] + - branch: ["array/*"] diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index 82b302ed..6e468bc8 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -118,9 +118,9 @@ describe("run", () => { }); }); - it("adds labels based on branch names that match different glob patterns", async () => { + it("adds multiple labels based on branch names that match different glob patterns", async () => { github.context.payload.pull_request!.head = { - ref: "my/feature/that-i-like", + ref: "test/feature/123", }; usingLabelerConfigYaml("branches.yml"); await run(); @@ -130,7 +130,7 @@ describe("run", () => { owner: "monalisa", repo: "helloworld", issue_number: 123, - labels: ["feature-branch"], + labels: ["test-branch", "feature-branch"], }); });