Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export function* mySaga(spaceId) {
- while (true) {
- const action = yield take(
- action =>
- action.type === MEDIA_SESSION_RESPONSE &&
- action.payload.data.category === ScreenShareData &&
- action.payload.data.topicId === spaceId
- );
- const remoteScreenSessionId = action.payload.data.content.sessionId;
- yield put(addRemoteScreenSessionId(remoteScreenSessionId));
- }
- }
- it('test', () => {
- const gen = sagas.mySaga('space_1');
- expect(gen.next().value).toEqual(
- take(
- action =>
- action.type === MEDIA_SESSION_RESPONSE &&
- action.payload.data.category === ScreenShareData &&
- action.payload.data.topicId === spaceId
- )
- );
- });
- Expected value to equal:
- {"@@redux-saga/IO": true, "combinator": false, "payload": {"pattern": [Function anonymous]}, "type": "TAKE"}
- Received:
- {"@@redux-saga/IO": true, "combinator": false, "payload": {"pattern": [Function anonymous]}, "type": "TAKE"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement