Skip to content

Commit c208fe4

Browse files
smoghe-bwclaude
andcommitted
Add endpoint-event model test
Generated from Claude9 with Claude Code Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 315011a commit c208fe4

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { EndpointEvent } from '../../../models/endpoint-event';
2+
import { EndpointStatusEnum } from '../../../models/endpoint-status-enum';
3+
import { EndpointTypeEnum } from '../../../models/endpoint-type-enum';
4+
5+
describe('EndpointEvent', () => {
6+
test('should create an endpoint event with all fields', () => {
7+
const event: EndpointEvent = {
8+
endpointId: 'ep-123456',
9+
type: EndpointTypeEnum.Webrtc,
10+
status: EndpointStatusEnum.Connected,
11+
creationTimestamp: '2024-02-18T10:30:00Z',
12+
expirationTimestamp: '2024-02-19T10:30:00Z',
13+
tag: 'test-event'
14+
};
15+
16+
expect(event.endpointId).toBe('ep-123456');
17+
expect(event.type).toBe('WEBRTC');
18+
expect(event.status).toBe('CONNECTED');
19+
expect(new Date(event.creationTimestamp).getFullYear()).toBe(2024);
20+
expect(new Date(event.creationTimestamp).toISOString()).toBe('2024-02-18T10:30:00.000Z');
21+
expect(new Date(event.expirationTimestamp).getFullYear()).toBe(2024);
22+
expect(new Date(event.expirationTimestamp).toISOString()).toBe('2024-02-19T10:30:00.000Z');
23+
expect(event.tag).toBe('test-event');
24+
});
25+
});

0 commit comments

Comments
 (0)