How to use the @jupyterlab/notebook.StaticNotebook function in @jupyterlab/notebook

To help you get started, we’ve selected a few @jupyterlab/notebook 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 jupyterlab / jupyterlab-data-explorer / tests / test-notebook / src / widget.spec.ts View on Github external
it('should create a notebook widget', () => {
        const widget = new StaticNotebook(options);
        expect(widget).to.be.an.instanceof(StaticNotebook);
      });
github jupyterlab / jupyterlab-data-explorer / tests / test-notebook / src / widget.spec.ts View on Github external
it('should create a `CodeCell`', () => {
          const contentFactory = new StaticNotebook.ContentFactory();
          const model = new CodeCellModel({});
          const codeOptions = { model, rendermime, contentFactory };
          const parent = new StaticNotebook(options);
          const widget = contentFactory.createCodeCell(codeOptions, parent);
          expect(widget).to.be.an.instanceof(CodeCell);
        });
      });
github jupyterlab / jupyterlab / tests / test-notebook / src / widget.spec.ts View on Github external
it('should be emitted when the model changes', () => {
        const widget = new StaticNotebook(options);
        const model = new NotebookModel();
        let called = false;
        widget.modelChanged.connect((sender, args) => {
          expect(sender).to.equal(widget);
          expect(args).to.be.undefined;
          called = true;
        });
        widget.model = model;
        expect(called).to.equal(true);
      });
    });
github jupyterlab / jupyterlab / tests / test-notebook / src / widget.spec.ts View on Github external
it('should create a `RawCell`', () => {
          const contentFactory = new StaticNotebook.ContentFactory();
          const model = new RawCellModel({});
          const rawOptions = { model, contentFactory };
          const parent = new StaticNotebook(options);
          const widget = contentFactory.createRawCell(rawOptions, parent);
          expect(widget).to.be.an.instanceof(RawCell);
        });
      });
github jupyterlab / jupyterlab / tests / test-notebook / src / widget.spec.ts View on Github external
it('should get the mime type for code cells', () => {
        const widget = new StaticNotebook(options);
        expect(widget.codeMimetype).to.equal('text/plain');
      });
github jupyterlab / jupyterlab / tests / test-notebook / src / widget.spec.ts View on Github external
it('should be the rendermime instance used by the widget', () => {
        const widget = new StaticNotebook(options);
        expect(widget.rendermime).to.equal(rendermime);
      });
    });
github jupyterlab / jupyterlab-data-explorer / tests / test-notebook / src / widget.spec.ts View on Github external
it('should be the rendermime instance used by the widget', () => {
        const widget = new StaticNotebook(options);
        expect(widget.rendermime).to.equal(rendermime);
      });
    });
github jupyterlab / jupyterlab / tests / test-notebook / src / widget.spec.ts View on Github external
it('should accept an optional editor config', () => {
        const widget = new StaticNotebook(options);
        expect(widget.editorConfig).to.equal(editorConfig);
      });
    });
github jupyterlab / jupyterlab-data-explorer / tests / test-notebook / src / widget.spec.ts View on Github external
it('should add the `jp-Notebook` class', () => {
        const widget = new StaticNotebook(options);
        expect(widget.hasClass('jp-Notebook')).to.equal(true);
      });
github jupyterlab / jupyterlab / tests / test-notebook / src / widget.spec.ts View on Github external
it('should accept an optional render', () => {
        const widget = new StaticNotebook(options);
        expect(widget.contentFactory).to.equal(contentFactory);
      });