本文整理匯總了TypeScript中@nteract/actions.createCellBelow函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript createCellBelow函數的具體用法?TypeScript createCellBelow怎麽用?TypeScript createCellBelow使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了createCellBelow函數的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: test
test("creates a brand new cell after the given id", () => {
const originalState = monocellDocument;
const id = originalState.getIn(["notebook", "cellOrder"]).last();
const state = reducers(
originalState,
actions.createCellBelow({ cellType: "markdown", id })
);
expect(state.getIn(["notebook", "cellOrder"]).size).toBe(4);
const cellId = state.getIn(["notebook", "cellOrder"]).last();
const cell = state.getIn(["notebook", "cellMap", cellId]);
expect(cell.get("cell_type")).toBe("markdown");
});