How to use the @jupyterlab/cells.BaseCellWidget function in @jupyterlab/cells

To help you get started, we’ve selected a few @jupyterlab/cells 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 / test / src / cells / widget.spec.ts View on Github external
it('should default to false', () => {
        let widget = new BaseCellWidget({ model, contentFactory });
        expect(widget.readOnly).to.be(false);
      });
github jupyterlab / jupyterlab / test / src / cells / widget.spec.ts View on Github external
it('should create a base cell widget', () => {
        let widget = new BaseCellWidget({ model, contentFactory });
        expect(widget).to.be.a(BaseCellWidget);
      });
github jupyterlab / jupyterlab / test / src / cells / widget.spec.ts View on Github external
it('should be safe to call multiple times', () => {
        let widget = new BaseCellWidget({ model, contentFactory });
        widget.dispose();
        widget.dispose();
        expect(widget.isDisposed).to.be(true);
      });
github jupyterlab / jupyterlab / test / src / cells / widget.spec.ts View on Github external
it('should be a code editor widget', () => {
        let widget = new BaseCellWidget({ model, contentFactory });
        expect(widget.editorWidget).to.be.a(CodeEditorWidget);
      });
github jupyterlab / jupyterlab / test / src / cells / widget.spec.ts View on Github external
it('should not throw an error (full test in input area)', () => {
        let widget = new BaseCellWidget({ model, contentFactory });
        expect(() => { widget.setPrompt(void 0); }).to.not.throwError();
        expect(() => { widget.setPrompt(null); }).to.not.throwError();
        expect(() => { widget.setPrompt(''); }).to.not.throwError();
        expect(() => { widget.setPrompt('null'); }).to.not.throwError();
        expect(() => { widget.setPrompt('test'); }).to.not.throwError();
      });
github jupyterlab / jupyterlab / test / src / cells / widget.spec.ts View on Github external
it('should be a cell editor', () => {
        let widget = new BaseCellWidget({ model, contentFactory });
        expect(widget.editor.uuid).to.be.ok();
      });
github jupyterlab / jupyterlab / test / src / cells / widget.spec.ts View on Github external
it('should be the model used by the widget', () => {
        let model = new CellModel({});
        let widget = new BaseCellWidget({ model, contentFactory });
        expect(widget.model).to.be(model);
      });