Skip to content

Commit d433efd

Browse files
committed
Unit test example for JComment
1 parent df9fb83 commit d433efd

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { JComment } from '@trungk18/interface/comment';
2+
3+
describe('JComment', () => {
4+
let testClass: any;
5+
6+
beforeEach(() => {
7+
testClass = new JComment(
8+
'',
9+
{
10+
id: '',
11+
name: '',
12+
email: '',
13+
avatarUrl: '',
14+
createdAt: '',
15+
updatedAt: '',
16+
issueIds: ['']
17+
}
18+
);
19+
});
20+
21+
it('Should have interfaces ', () => {
22+
expect(Object.keys(testClass).length).toEqual(5);
23+
expect(Object.keys(testClass.user).length).toEqual(7);
24+
});
25+
});

0 commit comments

Comments
 (0)