How to use the @nteract/commutable.emptyCodeCell.setIn function in @nteract/commutable

To help you get started, we’ve selected a few @nteract/commutable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nteract / nteract / packages / reducers / __tests__ / document.spec.ts View on Github external
beforeEach(() => {
    // Arrange
    initialState = initialDocument.set(
      "notebook",
      Immutable.fromJS({
        cellOrder,
        cellMap: {
          [cellOrder[0]]: emptyCodeCell
            .setIn(["metadata", "jupyter", "outputs_hidden"], false)
            .setIn(["metadata", "jupyter", "source_hidden"], false),
          [cellOrder[1]]: emptyCodeCell
            .setIn(["metadata", "jupyter", "outputs_hidden"], true)
            .setIn(["metadata", "jupyter", "source_hidden"], false),
          [cellOrder[2]]: emptyCodeCell
            .setIn(["metadata", "jupyter", "source_hidden"], false)
            .setIn(["metadata", "jupyter", "outputs_hidden"], false),
          [cellOrder[3]]: emptyCodeCell
            .setIn(["metadata", "jupyter", "source_hidden"], true)
            .setIn(["metadata", "jupyter", "outputs_hidden"], false)
        }
      })
    );
  });
github nteract / nteract / packages / reducers / __tests__ / document.spec.ts View on Github external
// Arrange
    initialState = initialDocument.set(
      "notebook",
      Immutable.fromJS({
        cellOrder,
        cellMap: {
          [cellOrder[0]]: emptyCodeCell
            .setIn(["metadata", "jupyter", "outputs_hidden"], false)
            .setIn(["metadata", "jupyter", "source_hidden"], false),
          [cellOrder[1]]: emptyCodeCell
            .setIn(["metadata", "jupyter", "outputs_hidden"], true)
            .setIn(["metadata", "jupyter", "source_hidden"], false),
          [cellOrder[2]]: emptyCodeCell
            .setIn(["metadata", "jupyter", "source_hidden"], false)
            .setIn(["metadata", "jupyter", "outputs_hidden"], false),
          [cellOrder[3]]: emptyCodeCell
            .setIn(["metadata", "jupyter", "source_hidden"], true)
            .setIn(["metadata", "jupyter", "outputs_hidden"], false)
        }
      })
    );
  });