Skip to content

Commit 5048b81

Browse files
committed
feat(enums): ReferenceAction
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent 63b78a2 commit 5048b81

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/**
2+
* @file Type Tests - ReferenceAction
3+
* @module commitlint-config/enums/tests/unit-d/ReferenceAction
4+
*/
5+
6+
import type TestSubject from '../reference-action'
7+
8+
describe('unit-d:enums/ReferenceAction', () => {
9+
it('should match [CLOSE = "closes"]', () => {
10+
expectTypeOf<typeof TestSubject>()
11+
.toHaveProperty('CLOSE')
12+
.toMatchTypeOf<'closes'>()
13+
})
14+
15+
it('should match [FIX = "fixes"]', () => {
16+
expectTypeOf<typeof TestSubject>()
17+
.toHaveProperty('FIX')
18+
.toMatchTypeOf<'fixes'>()
19+
})
20+
21+
it('should match [RELEASE = "releases"]', () => {
22+
expectTypeOf<typeof TestSubject>()
23+
.toHaveProperty('RELEASE')
24+
.toMatchTypeOf<'releases'>()
25+
})
26+
27+
it('should match [RESOLVE = "resolves"]', () => {
28+
expectTypeOf<typeof TestSubject>()
29+
.toHaveProperty('RESOLVE')
30+
.toMatchTypeOf<'resolves'>()
31+
})
32+
})

src/enums/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
*/
55

66
export { default as PromptKind } from './kind-prompt'
7+
export { default as ReferenceAction } from './reference-action'

src/enums/reference-action.ts

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* @file Enums - ReferenceAction
3+
* @module commitlint-config/enums/ReferenceAction
4+
*/
5+
6+
/**
7+
* Issue reference action types.
8+
*
9+
* @enum {Lowercase<string>}
10+
*/
11+
enum ReferenceAction {
12+
CLOSE = 'closes',
13+
FIX = 'fixes',
14+
RELEASE = 'releases',
15+
RESOLVE = 'resolves'
16+
}
17+
18+
export default ReferenceAction

0 commit comments

Comments
 (0)