Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should default to false', () => {
let widget = new BaseCellWidget({ model, contentFactory });
expect(widget.readOnly).to.be(false);
});
it('should create a base cell widget', () => {
let widget = new BaseCellWidget({ model, contentFactory });
expect(widget).to.be.a(BaseCellWidget);
});
it('should be safe to call multiple times', () => {
let widget = new BaseCellWidget({ model, contentFactory });
widget.dispose();
widget.dispose();
expect(widget.isDisposed).to.be(true);
});
it('should be a code editor widget', () => {
let widget = new BaseCellWidget({ model, contentFactory });
expect(widget.editorWidget).to.be.a(CodeEditorWidget);
});
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();
});
it('should be a cell editor', () => {
let widget = new BaseCellWidget({ model, contentFactory });
expect(widget.editor.uuid).to.be.ok();
});
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);
});