How to use the @jupyterlab/mainmenu.JupyterLabMenu function in @jupyterlab/mainmenu

To help you get started, we’ve selected a few @jupyterlab/mainmenu 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-mainmenu / src / labmenu.spec.ts View on Github external
it('should accept useSeparators as an option', () => {
        const menu1 = new JupyterLabMenu({ commands }, false);
        const menu2 = new JupyterLabMenu({ commands }, true);
        menu1.addGroup([{ command: 'run1' }, { command: 'run2' }]);
        menu2.addGroup([{ command: 'run1' }, { command: 'run2' }]);

        expect(menu1.menu.items.length).to.equal(2);
        expect(menu2.menu.items.length).to.equal(4);
      });
    });
github jupyterlab / jupyterlab / tests / test-mainmenu / src / labmenu.spec.ts View on Github external
it('should accept useSeparators as an option', () => {
        const menu1 = new JupyterLabMenu({ commands }, false);
        const menu2 = new JupyterLabMenu({ commands }, true);
        menu1.addGroup([{ command: 'run1' }, { command: 'run2' }]);
        menu2.addGroup([{ command: 'run1' }, { command: 'run2' }]);

        expect(menu1.menu.items.length).to.equal(2);
        expect(menu2.menu.items.length).to.equal(4);
      });
    });
github jupyterlab / jupyterlab / tests / test-mainmenu / src / labmenu.spec.ts View on Github external
beforeEach(() => {
      menu = new JupyterLabMenu({ commands });
    });

@jupyterlab/mainmenu

JupyterLab - Main Menu

BSD-3-Clause
Latest version published 4 days ago

Package Health Score

95 / 100
Full package analysis

Similar packages