|
| 1 | +/** |
| 2 | + * @file Type Tests - Type |
| 3 | + * @module commitlint-config/enums/tests/unit-d/Type |
| 4 | + */ |
| 5 | + |
| 6 | +import type TestSubject from '../type' |
| 7 | + |
| 8 | +describe('unit-d:enums/Type', () => { |
| 9 | + it('should match [BUILD = "build"]', () => { |
| 10 | + expectTypeOf<typeof TestSubject>() |
| 11 | + .toHaveProperty('BUILD') |
| 12 | + .toMatchTypeOf<'build'>() |
| 13 | + }) |
| 14 | + |
| 15 | + it('should match [CHORE = "chore"]', () => { |
| 16 | + expectTypeOf<typeof TestSubject>() |
| 17 | + .toHaveProperty('CHORE') |
| 18 | + .toMatchTypeOf<'chore'>() |
| 19 | + }) |
| 20 | + |
| 21 | + it('should match [CI = "ci"]', () => { |
| 22 | + expectTypeOf<typeof TestSubject>() |
| 23 | + .toHaveProperty('CI') |
| 24 | + .toMatchTypeOf<'ci'>() |
| 25 | + }) |
| 26 | + |
| 27 | + it('should match [DOCS = "docs"]', () => { |
| 28 | + expectTypeOf<typeof TestSubject>() |
| 29 | + .toHaveProperty('DOCS') |
| 30 | + .toMatchTypeOf<'docs'>() |
| 31 | + }) |
| 32 | + |
| 33 | + it('should match [FEAT = "feat"]', () => { |
| 34 | + expectTypeOf<typeof TestSubject>() |
| 35 | + .toHaveProperty('FEAT') |
| 36 | + .toMatchTypeOf<'feat'>() |
| 37 | + }) |
| 38 | + |
| 39 | + it('should match [FIX = "fix"]', () => { |
| 40 | + expectTypeOf<typeof TestSubject>() |
| 41 | + .toHaveProperty('FIX') |
| 42 | + .toMatchTypeOf<'fix'>() |
| 43 | + }) |
| 44 | + |
| 45 | + it('should match [PERF = "perf"]', () => { |
| 46 | + expectTypeOf<typeof TestSubject>() |
| 47 | + .toHaveProperty('PERF') |
| 48 | + .toMatchTypeOf<'perf'>() |
| 49 | + }) |
| 50 | + |
| 51 | + it('should match [REFACTOR = "refactor"]', () => { |
| 52 | + expectTypeOf<typeof TestSubject>() |
| 53 | + .toHaveProperty('REFACTOR') |
| 54 | + .toMatchTypeOf<'refactor'>() |
| 55 | + }) |
| 56 | + |
| 57 | + it('should match [REVERT = "revert"]', () => { |
| 58 | + expectTypeOf<typeof TestSubject>() |
| 59 | + .toHaveProperty('REVERT') |
| 60 | + .toMatchTypeOf<'revert'>() |
| 61 | + }) |
| 62 | + |
| 63 | + it('should match [STYLE = "style"]', () => { |
| 64 | + expectTypeOf<typeof TestSubject>() |
| 65 | + .toHaveProperty('STYLE') |
| 66 | + .toMatchTypeOf<'style'>() |
| 67 | + }) |
| 68 | + |
| 69 | + it('should match [TEST = "test"]', () => { |
| 70 | + expectTypeOf<typeof TestSubject>() |
| 71 | + .toHaveProperty('TEST') |
| 72 | + .toMatchTypeOf<'test'>() |
| 73 | + }) |
| 74 | + |
| 75 | + it('should match [WIP = "wip"]', () => { |
| 76 | + expectTypeOf<typeof TestSubject>() |
| 77 | + .toHaveProperty('WIP') |
| 78 | + .toMatchTypeOf<'wip'>() |
| 79 | + }) |
| 80 | +}) |
0 commit comments