Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { framePromise, sleep } from '@jupyterlab/testutils';
const TEST_ITEM_CLASS = 'jp-TestItem';
const ITEM_CLASS = 'jp-Completer-item';
const ACTIVE_CLASS = 'jp-mod-active';
function createEditorWidget(): CodeEditorWrapper {
let model = new CodeEditor.Model();
let factory = (options: CodeEditor.IOptions) => {
return new CodeMirrorEditor(options);
};
return new CodeEditorWrapper({ factory, model });
}
class CustomRenderer extends Completer.Renderer {
createItemNode(
item: Completer.IItem,
typeMap: Completer.TypeMap,
orderedTypes: string[]
): HTMLLIElement {
let li = super.createItemNode(item, typeMap, orderedTypes);
li.classList.add(TEST_ITEM_CLASS);
return li;
}
}
class LogWidget extends Completer {
events: string[] = [];
methods: string[] = [];