How to use the @jupyterlab/services.TerminalManager function in @jupyterlab/services

To help you get started, we’ve selected a few @jupyterlab/services 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 / packages / services / examples / browser / src / terminal.ts View on Github external
export async function main() {
  log('Terminal');

  // See if terminals are available
  if (Terminal.isAvailable()) {
    let manager = new TerminalManager();
    // Create a named terminal session and send some data.
    let session = await manager.startNew();
    session.send({ type: 'stdin', content: ['foo'] });
  }
}
github jupyterlab / jupyterlab-data-explorer / tests / test-services / src / terminal / manager.spec.ts View on Github external
it('should get the server settings', () => {
        manager.dispose();
        const serverSettings = ServerConnection.makeSettings();
        const standby = 'never';
        const token = serverSettings.token;
        manager = new TerminalManager({ serverSettings, standby });
        expect(manager.serverSettings.token).to.equal(token);
      });
    });
github jupyterlab / jupyterlab / tests / test-services / src / terminal / manager.spec.ts View on Github external
it('should get the server settings', () => {
        manager.dispose();
        const serverSettings = ServerConnection.makeSettings();
        const standby = 'never';
        const token = serverSettings.token;
        manager = new TerminalManager({ serverSettings, standby });
        expect(manager.serverSettings.token).to.equal(token);
      });
    });
github jupyterlab / jupyterlab / tests / test-services / src / terminal / manager.spec.ts View on Github external
it('should accept no options', () => {
        manager.dispose();
        manager = new TerminalManager({ standby: 'never' });
        expect(manager).to.be.an.instanceof(TerminalManager);
      });
github jupyterlab / jupyterlab-data-explorer / tests / test-services / src / terminal / manager.spec.ts View on Github external
it('should accept options', () => {
        manager.dispose();
        manager = new TerminalManager({
          serverSettings: ServerConnection.makeSettings(),
          standby: 'never'
        });
        expect(manager).to.be.an.instanceof(TerminalManager);
      });
    });
github jupyterlab / jupyterlab / tests / test-services / src / terminal / manager.spec.ts View on Github external
it('should test whether the manager is ready', async () => {
        manager.dispose();
        manager = new TerminalManager({ standby: 'never' });
        expect(manager.isReady).to.equal(false);
        await manager.ready;
        expect(manager.isReady).to.equal(true);
      });
    });
github jupyterlab / jupyterlab-data-explorer / tests / test-services / src / terminal / manager.spec.ts View on Github external
it('should test whether the manager is ready', async () => {
        manager.dispose();
        manager = new TerminalManager({ standby: 'never' });
        expect(manager.isReady).to.equal(false);
        await manager.ready;
        expect(manager.isReady).to.equal(true);
      });
    });
github jupyterlab / jupyterlab / tests / test-services / src / terminal / manager.spec.ts View on Github external
beforeEach(() => {
    manager = new TerminalManager({ standby: 'never' });
    return manager.ready;
  });
github jupyterlab / jupyterlab-data-explorer / tests / test-services / src / terminal / manager.spec.ts View on Github external
beforeEach(() => {
    manager = new TerminalManager({ standby: 'never' });
    return manager.ready;
  });
github jupyterlab / jupyterlab / tests / test-terminal / src / terminal.spec.ts View on Github external
describe('Terminal', () => {
    let widget: LogTerminal;
    let session: TerminalNS.ITerminalConnection;
    let manager = new TerminalManager();

    before(async () => {
      session = await manager.startNew();
    });

    beforeEach(() => {
      widget = new LogTerminal(session);
      Widget.attach(widget, document.body);
      return framePromise();
    });

    afterEach(() => {
      widget.dispose();
    });

    describe('#constructor()', () => {