diff --git a/test/action.test.ts b/test/action.test.ts index 8026458..c35ca3f 100644 --- a/test/action.test.ts +++ b/test/action.test.ts @@ -162,7 +162,7 @@ describe('Integration test', () => { setDefaultInputs(); vi.stubEnv('INPUT_ISSUE-FORM', JSON.stringify(dropdownForm)); vi.stubEnv('INPUT_SECTION', 'type'); - vi.stubEnv('INPUT_BLOCK-LIST', 'other\nnone'); + vi.stubEnv('INPUT_BLOCK-LIST', 'other\nnone\nOther'); vi.mocked(mocks['@octokit/core']).config.get.mockImplementation( async (params: { owner: string; repo: string; path: string }) => { diff --git a/test/unit/config.fixture.ts b/test/unit/config.fixture.ts index 0fa6c3a..ff58fd0 100644 --- a/test/unit/config.fixture.ts +++ b/test/unit/config.fixture.ts @@ -23,6 +23,7 @@ export const templateConfig = { section: [ { id: ['type'], + 'block-list': ['Other'], label: [ { name: 'bug 🐛', keys: ['Bug Report'] }, { name: 'RFE 🎁', keys: ['Feature Request'] }, @@ -30,6 +31,7 @@ export const templateConfig = { }, { id: ['severity'], + 'block-list': ['None', 'Other'], label: [ { name: 'high', keys: ['High'] }, { name: 'medium', keys: ['Medium'] }, diff --git a/test/unit/config.test.ts b/test/unit/config.test.ts index 1973da2..61d2de2 100644 --- a/test/unit/config.test.ts +++ b/test/unit/config.test.ts @@ -137,7 +137,9 @@ describe('Test Config class', () => { { "section": [ { - "block-list": [], + "block-list": [ + "Other", + ], "id": [ "type", ], @@ -157,7 +159,10 @@ describe('Test Config class', () => { ], }, { - "block-list": [], + "block-list": [ + "None", + "Other", + ], "id": [ "severity", ], diff --git a/test/unit/issue-form.fixture.ts b/test/unit/issue-form.fixture.ts index aa1d1f5..fd93776 100644 --- a/test/unit/issue-form.fixture.ts +++ b/test/unit/issue-form.fixture.ts @@ -10,6 +10,6 @@ export const dropdownForm = { title: 'Test issue', body: 'Test body', severity: 'High', - type: 'Bug Report, Feature Request, other, none', + type: 'Bug Report, Feature Request, Other, none', checkList: ['one', 'two', 'three'], }; diff --git a/test/unit/issue-form.test.ts b/test/unit/issue-form.test.ts index c470733..1ec614f 100644 --- a/test/unit/issue-form.test.ts +++ b/test/unit/issue-form.test.ts @@ -44,7 +44,7 @@ describe('Test IssueForm class', () => { ] `); - expect(issueForm.listKeywords('type', ['other', 'none'])) + expect(issueForm.listKeywords('type', ['other', 'none', 'Other'])) .toMatchInlineSnapshot(` [ "Bug Report", diff --git a/test/unit/labeler.test.ts b/test/unit/labeler.test.ts index e5e31c2..e3df662 100644 --- a/test/unit/labeler.test.ts +++ b/test/unit/labeler.test.ts @@ -26,7 +26,7 @@ describe('Test Labeler class', () => { beforeEach(() => { vi.stubEnv('INPUT_SECTION', 'type'); - vi.stubEnv('INPUT_BLOCK-LIST', 'other\nnone'); + vi.stubEnv('INPUT_BLOCK-LIST', 'other\nnone\nOther'); labeler = new Labeler( new IssueForm(dropdownForm), @@ -43,6 +43,7 @@ describe('Test Labeler class', () => { [ "other", "none", + "Other", ] `);