How to use the @jupyterlab/console.ConsoleHistory function in @jupyterlab/console

To help you get started, we’ve selected a few @jupyterlab/console 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-console / src / history.spec.ts View on Github external
it('should allow addition of history items', async () => {
        const history = new ConsoleHistory({ session });
        const item = 'foo';
        history.push(item);
        const result = await history.back('');
        expect(result).to.equal(item);
      });
    });
github jupyterlab / jupyterlab / tests / test-console / src / history.spec.ts View on Github external
it('should be safe to dispose multiple times', () => {
        const history = new ConsoleHistory({ session });
        expect(history.isDisposed).to.equal(false);
        history.dispose();
        history.dispose();
        expect(history.isDisposed).to.equal(true);
      });
    });
github jupyterlab / jupyterlab / tests / test-console / src / history.spec.ts View on Github external
it('should return an empty string if no history exists', async () => {
        const history = new ConsoleHistory({ session });
        const result = await history.forward('');
        expect(result).to.equal('');
      });
github jupyterlab / jupyterlab / tests / test-console / src / history.spec.ts View on Github external
it('should be the client session object', () => {
        const history = new ConsoleHistory({ session });
        expect(history.session).to.equal(session);
      });
    });
github jupyterlab / jupyterlab / tests / test-console / src / history.spec.ts View on Github external
it('should create a console history object', () => {
        const history = new ConsoleHistory({ session });
        expect(history).to.be.an.instanceof(ConsoleHistory);
      });
    });
github jupyterlab / jupyterlab / tests / test-console / src / history.spec.ts View on Github external
it('should return an empty string if no history exists', async () => {
        const history = new ConsoleHistory({ session });
        const result = await history.back('');
        expect(result).to.equal('');
      });