How to use the @jupyterlab/observables/src.ObservableJSON.ChangeMessage function in @jupyterlab/observables

To help you get started, we’ve selected a few @jupyterlab/observables 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-observables / src / observablejson.spec.ts View on Github external
it('should be the args of the message', () => {
        const args: IObservableJSON.IChangedArgs = {
          key: 'foo',
          type: 'add',
          oldValue: 'ho',
          newValue: 'hi'
        };
        const message = new ObservableJSON.ChangeMessage(args);
        expect(message.args).to.equal(args);
      });
    });
github jupyterlab / jupyterlab / tests / test-observables / src / observablejson.spec.ts View on Github external
it('should create a new message', () => {
        const message = new ObservableJSON.ChangeMessage({
          key: 'foo',
          type: 'add',
          oldValue: 1,
          newValue: 2
        });
        expect(message).to.be.an.instanceof(ObservableJSON.ChangeMessage);
      });
    });