本文整理汇总了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();
});