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 create a new ContentFactory', () => {
const editorFactory = NBTestUtils.editorFactory;
const factory = new StaticNotebook.ContentFactory({ editorFactory });
expect(factory).to.be.an.instanceof(StaticNotebook.ContentFactory);
});
});
it('should create a new ContentFactory', () => {
const factory = new NotebookPanel.ContentFactory({
editorFactory: NBTestUtils.editorFactory
});
expect(factory).to.be.an.instanceof(NotebookPanel.ContentFactory);
});
});
describe('cells/widget', () => {
const editorFactory = NBTestUtils.editorFactory;
describe('Cell', () => {
const contentFactory = NBTestUtils.createBaseCellFactory();
const model = new CellModel({});
describe('#constructor()', () => {
it('should create a base cell widget', () => {
const widget = new Cell({ model, contentFactory }).initializeState();
expect(widget).toBeInstanceOf(Cell);
});
it('should accept a custom contentFactory', () => {
const contentFactory = NBTestUtils.createBaseCellFactory();
const widget = new Cell({ model, contentFactory }).initializeState();
expect(widget).toBeInstanceOf(Cell);
});
describe('cells/widget', () => {
const editorFactory = NBTestUtils.editorFactory;
describe('Cell', () => {
const contentFactory = NBTestUtils.createBaseCellFactory();
const model = new CellModel({});
describe('#constructor()', () => {
it('should create a base cell widget', () => {
const widget = new Cell({ model, contentFactory }).initializeState();
expect(widget).toBeInstanceOf(Cell);
});
it('should accept a custom contentFactory', () => {
const contentFactory = NBTestUtils.createBaseCellFactory();
const widget = new Cell({ model, contentFactory }).initializeState();
expect(widget).toBeInstanceOf(Cell);
});
it('should create a new ContentFactory', () => {
const editorFactory = NBTestUtils.editorFactory;
const factory = new StaticNotebook.ContentFactory({ editorFactory });
expect(factory).to.be.an.instanceof(StaticNotebook.ContentFactory);
});
});