mirror of
https://github.com/pavlobu/deskreen.git
synced 2025-05-18 08:20:10 -07:00
35 lines
938 B
TypeScript
35 lines
938 B
TypeScript
import SharingSessionService from '.';
|
|
import SharingType from './SharingType';
|
|
|
|
jest.useFakeTimers();
|
|
|
|
describe('SharingSession unit tests', () => {
|
|
let sharingSession: SharingSessionService;
|
|
|
|
beforeEach(() => {
|
|
sharingSession = new SharingSessionService();
|
|
});
|
|
|
|
afterEach(() => {
|
|
jest.clearAllMocks();
|
|
});
|
|
|
|
describe('when new SahringSession() is called', () => {
|
|
it('should create sharing session with id', () => {
|
|
expect(sharingSession.id).toBeTruthy();
|
|
});
|
|
|
|
it('should crete sharing session with deviceID equal to "" ', () => {
|
|
expect(sharingSession.deviceID).toBe('');
|
|
});
|
|
|
|
it('should create sharing session with sharingType equal to NOT_SET', () => {
|
|
expect(sharingSession.sharingType).toBe(SharingType.NOT_SET);
|
|
});
|
|
|
|
it('should create sharing session with sharingStream set to null', () => {
|
|
expect(sharingSession.sharingStream).toBe(null);
|
|
});
|
|
});
|
|
});
|