Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function* asyncServicePointFetchWatcher() {
// use takeLatest instead of take every, so double click in short time will not trigger more fork
yield [
takeEvery('app/updateServicePoint', requestUpdateServicePointAsync),
takeLatest('app/getServicePoint', requestGetServicePointAsync),
takeLatest('app/getServicePoints', requestGetServicePointsAsync),
takeEvery('app/deleteServicePoint', requestDeleteServicePointAsync),
]
}
]
it('should watch every CARD_FETCH_REQUEST action', () => {
assert.deepEqual(
watchFetchCard().next().value,
takeEvery(types.CARD_FETCH_REQUEST, fetchCardTask).next().value
);
});
function* recentRecipesSaga(feathersApp) {
yield* takeEvery('RECENT_RECIPES_REQUESTED', fetchRecentRecipes, feathersApp);
}
export default function* screenSaver(): any {
yield takeEvery([types.OPEN_MODAL, types.IS_HERE, types.CLOSE_MODAL], modalHandler);
yield takeEvery(types.CLOSE_CONTENT, contentHandler);
}
export function* applyInspectorState(getState) {
yield* takeEvery(actionTypes.UI.Inspector.APPLY, function* applyAllChanges(action) {
const state = getState();
const {nodeContextPath} = action.payload;
const transientNodeInspectorValues = $get([nodeContextPath, 'nodeProperties'], getTransientInspectorValues(state));
for (const key of Object.keys(transientNodeInspectorValues)) {
yield put(actions.Changes.add({
type: 'PackageFactory.Guevara:Property',
subject: nodeContextPath,
payload: {
propertyName: key,
value: transientNodeInspectorValues[key]
}
}));
}
export function* watchUpdateBoardModalForm() {
yield* takeEvery(types.BOARD_UPDATE_MODAL_FORM, updateBoardModalFormTask);
}
export function* watchSetReadonly() {
yield* takeEvery(
ActionType.SET_READONLY,
Handler.handleSetReadonly
)
}
export function* watchReadPerform() {
yield* takeEvery('READ', readSaga)
}
export function * watchSetAllowance () {
yield * takeEvery(constants.SET_ALLOWANCE, setAllowanceSaga)
}
export function * watchGetAllowance () {