How to use the @jupyterlab/testutils.NBTestUtils.DEFAULT_OUTPUTS 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 / tests / test-rendermime / src / outputmodel.spec.ts View on Github external
it('should handle all bundle types', () => {
        for (let i = 0; i < NBTestUtils.DEFAULT_OUTPUTS.length; i++) {
          const output = NBTestUtils.DEFAULT_OUTPUTS[i];
          const bundle = OutputModel.getData(output);
          expect(Object.keys(bundle).length).to.not.equal(0);
        }
      });
    });
github jupyterlab / jupyterlab-data-explorer / tests / test-outputarea / src / model.spec.ts View on Github external
it('should accept options', () => {
        const contentFactory = new OutputAreaModel.ContentFactory();
        model = new OutputAreaModel({
          values: NBTestUtils.DEFAULT_OUTPUTS,
          contentFactory,
          trusted: true
        });
        expect(model.contentFactory).to.equal(contentFactory);
        expect(model.trusted).to.equal(true);
      });
    });
github jupyterlab / jupyterlab-data-explorer / tests / test-outputarea / src / widget.spec.ts View on Github external
it('should handle an added output', () => {
        widget.model.clear();
        widget.methods = [];
        widget.model.add(NBTestUtils.DEFAULT_OUTPUTS[0]);
        expect(widget.methods).to.contain('onModelChanged');
        expect(widget.widgets.length).to.equal(1);
      });
github jupyterlab / jupyterlab-data-explorer / tests / test-outputarea / src / model.spec.ts View on Github external
it('should cause all of the cells to `set`', () => {
        let called = 0;
        model.add(NBTestUtils.DEFAULT_OUTPUTS[0]);
        model.add(NBTestUtils.DEFAULT_OUTPUTS[1]);
        model.changed.connect(() => {
          called++;
        });
        model.trusted = true;
        expect(called).to.equal(2);
      });
    });
github jupyterlab / jupyterlab-data-explorer / tests / test-cells / src / model.spec.ts View on Github external
it('should update the trusted state of the output models', () => {
        const model = new CodeCellModel({});
        model.outputs.add(NBTestUtils.DEFAULT_OUTPUTS[0]);
        expect(model.outputs.get(0).trusted).to.equal(false);
        model.trusted = true;
        expect(model.outputs.get(0).trusted).to.equal(true);
      });
    });
github jupyterlab / jupyterlab / tests / test-rendermime / src / outputmodel.spec.ts View on Github external
it('should handle all bundle types', () => {
        for (let i = 0; i < NBTestUtils.DEFAULT_OUTPUTS.length; i++) {
          const output = NBTestUtils.DEFAULT_OUTPUTS[i];
          const bundle = OutputModel.getData(output);
          expect(Object.keys(bundle).length).to.not.equal(0);
        }
      });
    });
github jupyterlab / jupyterlab / tests / test-outputarea / src / widget.spec.ts View on Github external
it('should handle a set', () => {
        widget.model.clear();
        widget.model.add(NBTestUtils.DEFAULT_OUTPUTS[0]);
        widget.methods = [];
        widget.model.add(NBTestUtils.DEFAULT_OUTPUTS[0]);
        expect(widget.methods).to.contain('onModelChanged');
        expect(widget.widgets.length).to.equal(1);
      });
github jupyterlab / jupyterlab / tests / test-cells / src / model.spec.ts View on Github external
it('should update the trusted state of the output models', () => {
        const model = new CodeCellModel({});
        model.outputs.add(NBTestUtils.DEFAULT_OUTPUTS[0]);
        expect(model.outputs.get(0).trusted).to.equal(false);
        model.trusted = true;
        expect(model.outputs.get(0).trusted).to.equal(true);
      });
    });
github jupyterlab / jupyterlab / tests / test-outputarea / src / widget.spec.ts View on Github external
beforeEach(() => {
    model = new OutputAreaModel({
      values: NBTestUtils.DEFAULT_OUTPUTS,
      trusted: true
    });
    widget = new LogOutputArea({ rendermime, model });
  });
github jupyterlab / jupyterlab-data-explorer / tests / test-outputarea / src / widget.spec.ts View on Github external
beforeEach(() => {
    model = new OutputAreaModel({
      values: NBTestUtils.DEFAULT_OUTPUTS,
      trusted: true
    });
    widget = new LogOutputArea({ rendermime, model });
  });