Skip to content

Commit cc0c0a4

Browse files
committed
✅ test: add test #15
1 parent 0d5eece commit cc0c0a4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/parser-opts/tests/index.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ describe('@gitmoji/parser-opts', () => {
8282
expect(subject).toBe('extract parser-opts packages');
8383
expect(ticket).toBeUndefined();
8484
});
85+
8586
it(':sparkles: feat(changelog): 添加中文标题', () => {
8687
const result = regex.exec(':sparkles: feat(changelog): 添加中文标题');
8788

@@ -92,5 +93,16 @@ describe('@gitmoji/parser-opts', () => {
9293
expect(subject).toBe('添加中文标题');
9394
expect(ticket).toBeUndefined();
9495
});
96+
97+
it('💥 feat(unicode): support unicode', () => {
98+
const result = regex.exec('💥 feat(unicode): support unicode');
99+
100+
expect(result).toHaveLength(5);
101+
const { type, scope, subject, ticket } = result.groups;
102+
expect(type).toBe('feat');
103+
expect(scope).toBe('unicode');
104+
expect(subject).toBe('support unicode');
105+
expect(ticket).toBeUndefined();
106+
});
95107
});
96108
});

0 commit comments

Comments
 (0)