Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import {
ModuleLoader
} from '@jupyterlab/application';
/**
* A module loader instance.
*/
const _loader = new ModuleLoader();
/**
* Define a module that can be synchronously required.
*
* @param path - The version-mangled fully qualified path of the module.
* For example, "foo@1.0.1/lib/bar/baz.js".
*
* @param callback - The callback function for invoking the module.
*/
export
function define(path: string, callback: ModuleLoader.DefineCallback): void {
_loader.define.call(_loader, path, callback);
}
describe('JupyterLab', () => {
let lab: JupyterLab;
let loader = new ModuleLoader();
beforeEach(() => {
lab = new JupyterLab();
});
describe('#constructor()', () => {
it('should create a JupyterLab object', () => {
expect(lab).to.be.a(JupyterLab);
});
it('should accept options', () => {
lab = new JupyterLab({
version: 'foo',
gitDescription: 'foo',
loader
beforeEach(() => {
loader = new ModuleLoader();
});