本文整理匯總了TypeScript中redux-observable.ActionsObservable.from方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript ActionsObservable.from方法的具體用法?TypeScript ActionsObservable.from怎麽用?TypeScript ActionsObservable.from使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類redux-observable.ActionsObservable
的用法示例。
在下文中一共展示了ActionsObservable.from方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: test
test("doesnt complete but does push until abort action", done => {
const frontendToShell = new Subject();
const shellToFrontend = new Subject();
const mockShell = Subject.create(frontendToShell, shellToFrontend);
const channels = mockShell;
const state$ = {
value: {
core: stateModule.makeStateRecord({
kernelRef: "fake",
entities: stateModule.makeEntitiesRecord({
kernels: stateModule.makeKernelsRecord({
byRef: Immutable.Map({
fake: stateModule.makeRemoteKernelRecord({
channels,
status: "connected"
})
})
})
})
}),
app: {
notificationSystem: { addNotification: jest.fn() }
}
}
};
const action$ = ActionsObservable.from([]);
const message = createExecuteRequest("source");
const observable = createExecuteCellStream(
action$,
state$.value,
message,
"id",
"fakeContentRef"
);
const actionBuffer = [];
observable.subscribe(x => actionBuffer.push(x), err => done.fail(err));
expect(actionBuffer).toEqual([
actions.sendExecuteRequest({
id: "id",
message,
contentRef: "fakeContentRef"
})
]);
done();
});