How to use the @jupyterlab/testutils.NBTestUtils.editorFactory function in @jupyterlab/testutils

To help you get started, we’ve selected a few @jupyterlab/testutils 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 new ContentFactory', () => {
          const editorFactory = NBTestUtils.editorFactory;
          const factory = new StaticNotebook.ContentFactory({ editorFactory });
          expect(factory).to.be.an.instanceof(StaticNotebook.ContentFactory);
        });
      });
github jupyterlab / jupyterlab / tests / test-notebook / src / panel.spec.ts View on Github external
it('should create a new ContentFactory', () => {
          const factory = new NotebookPanel.ContentFactory({
            editorFactory: NBTestUtils.editorFactory
          });
          expect(factory).to.be.an.instanceof(NotebookPanel.ContentFactory);
        });
      });
github jupyterlab / jupyterlab / tests / test-cells / src / widget.spec.ts View on Github external
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);
      });
github jupyterlab / jupyterlab-data-explorer / tests / test-cells / src / widget.spec.ts View on Github external
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);
      });
github jupyterlab / jupyterlab / tests / test-notebook / src / widget.spec.ts View on Github external
it('should create a new ContentFactory', () => {
          const editorFactory = NBTestUtils.editorFactory;
          const factory = new StaticNotebook.ContentFactory({ editorFactory });
          expect(factory).to.be.an.instanceof(StaticNotebook.ContentFactory);
        });
      });