|
| 1 | +/** |
| 2 | + * @file Type Tests - PromptKind |
| 3 | + * @module commitlint-config/enums/tests/unit-d/PromptKind |
| 4 | + */ |
| 5 | + |
| 6 | +import type TestSubject from '../kind-prompt' |
| 7 | + |
| 8 | +describe('unit-d:enums/PromptKind', () => { |
| 9 | + it('should match [BODY = "body"]', () => { |
| 10 | + expectTypeOf<typeof TestSubject>() |
| 11 | + .toHaveProperty('BODY') |
| 12 | + .toMatchTypeOf<'body'>() |
| 13 | + }) |
| 14 | + |
| 15 | + it('should match [BREAKING = "breaking"]', () => { |
| 16 | + expectTypeOf<typeof TestSubject>() |
| 17 | + .toHaveProperty('BREAKING') |
| 18 | + .toMatchTypeOf<'breaking'>() |
| 19 | + }) |
| 20 | + |
| 21 | + it('should match [BREAKING_BODY = "breakingBody"]', () => { |
| 22 | + expectTypeOf<typeof TestSubject>() |
| 23 | + .toHaveProperty('BREAKING_BODY') |
| 24 | + .toMatchTypeOf<'breakingBody'>() |
| 25 | + }) |
| 26 | + |
| 27 | + it('should match [ISSUES = "issues"]', () => { |
| 28 | + expectTypeOf<typeof TestSubject>() |
| 29 | + .toHaveProperty('ISSUES') |
| 30 | + .toMatchTypeOf<'issues'>() |
| 31 | + }) |
| 32 | + |
| 33 | + it('should match [ISSUES_BODY = "issuesBody"]', () => { |
| 34 | + expectTypeOf<typeof TestSubject>() |
| 35 | + .toHaveProperty('ISSUES_BODY') |
| 36 | + .toMatchTypeOf<'issuesBody'>() |
| 37 | + }) |
| 38 | + |
| 39 | + it('should match [IS_BREAKING = "isBreaking"]', () => { |
| 40 | + expectTypeOf<typeof TestSubject>() |
| 41 | + .toHaveProperty('IS_BREAKING') |
| 42 | + .toMatchTypeOf<'isBreaking'>() |
| 43 | + }) |
| 44 | + |
| 45 | + it('should match [IS_ISSUE_AFFECTED = "isIssueAffected"]', () => { |
| 46 | + expectTypeOf<typeof TestSubject>() |
| 47 | + .toHaveProperty('IS_ISSUE_AFFECTED') |
| 48 | + .toMatchTypeOf<'isIssueAffected'>() |
| 49 | + }) |
| 50 | + |
| 51 | + it('should match [SCOPE = "scope"]', () => { |
| 52 | + expectTypeOf<typeof TestSubject>() |
| 53 | + .toHaveProperty('SCOPE') |
| 54 | + .toMatchTypeOf<'scope'>() |
| 55 | + }) |
| 56 | + |
| 57 | + it('should match [SUBJECT = "subject"]', () => { |
| 58 | + expectTypeOf<typeof TestSubject>() |
| 59 | + .toHaveProperty('SUBJECT') |
| 60 | + .toMatchTypeOf<'subject'>() |
| 61 | + }) |
| 62 | + |
| 63 | + it('should match [TYPE = "type"]', () => { |
| 64 | + expectTypeOf<typeof TestSubject>() |
| 65 | + .toHaveProperty('TYPE') |
| 66 | + .toMatchTypeOf<'type'>() |
| 67 | + }) |
| 68 | +}) |
0 commit comments