فهرست منبع

modernize codemirror tests

Steven Silvester 5 سال پیش
والد
کامیت
cf37a1b085

+ 11 - 0
packages/codemirror/.vscode/launch.json

@@ -0,0 +1,11 @@
+{
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "type": "node",
+            "request": "attach",
+            "name": "Attach",
+            "port": 9229
+        }
+    ]
+}

+ 0 - 0
tests/test-codemirror/babel.config.js → packages/codemirror/babel.config.js


+ 2 - 0
packages/codemirror/jest.config.js

@@ -0,0 +1,2 @@
+const func = require('@jupyterlab/testutils/lib/jest-config-new');
+module.exports = func(__dirname);

+ 9 - 0
packages/codemirror/package.json

@@ -27,9 +27,14 @@
   },
   "scripts": {
     "build": "tsc -b",
+    "build:test": "tsc --build tsconfig.test.json",
     "clean": "rimraf lib",
     "docs": "typedoc src",
     "prepublishOnly": "npm run build",
+    "test": "jest",
+    "test:cov": "jest --collect-coverage",
+    "test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
+    "test:debug:watch": "node --inspect-brk node_modules/.bin/jest --runInBand --watch",
     "watch": "tsc -b --watch"
   },
   "dependencies": {
@@ -50,8 +55,12 @@
     "react": "~16.9.0"
   },
   "devDependencies": {
+    "@jupyterlab/testutils": "^2.1.0",
     "@types/codemirror": "^0.0.76",
+    "@types/jest": "^24.0.23",
+    "jest": "^25.2.3",
     "rimraf": "~3.0.0",
+    "ts-jest": "^25.2.1",
     "typedoc": "^0.15.4",
     "typescript": "~3.7.3"
   },

+ 79 - 85
tests/test-codemirror/src/editor.spec.ts → packages/codemirror/test/editor.spec.ts

@@ -1,10 +1,6 @@
 // Copyright (c) Jupyter Development Team.
-// Distributed under the terms of the Modified BSD License.
 
-// tslint:disable-next-line
-/// <reference path="../../../packages/codemirror/typings/codemirror/codemirror.d.ts"/>
-
-import { expect } from 'chai';
+import 'jest';
 
 import { generate, simulate } from 'simulate-event';
 
@@ -48,7 +44,7 @@ describe('CodeMirrorEditor', () => {
 
   describe('#constructor()', () => {
     it('should create a CodeMirrorEditor', () => {
-      expect(editor).to.be.an.instanceof(CodeMirrorEditor);
+      expect(editor).toBeInstanceOf(CodeMirrorEditor);
     });
   });
 
@@ -60,9 +56,9 @@ describe('CodeMirrorEditor', () => {
         edge = args;
       };
       editor.edgeRequested.connect(listener);
-      expect(edge).to.be.null;
+      expect(edge).toBeNull();
       editor.editor.triggerOnKeyDown(event);
-      expect(edge).to.equal('top');
+      expect(edge).toBe('top');
     });
 
     it('should emit a signal when the bottom edge is requested', () => {
@@ -72,26 +68,24 @@ describe('CodeMirrorEditor', () => {
         edge = args;
       };
       editor.edgeRequested.connect(listener);
-      expect(edge).to.be.null;
+      expect(edge).toBeNull();
       editor.editor.triggerOnKeyDown(event);
-      expect(edge).to.equal('bottom');
+      expect(edge).toBe('bottom');
     });
   });
 
   describe('#uuid', () => {
     it('should be the unique id of the editor', () => {
-      expect(editor.uuid).to.be.ok;
+      expect(editor.uuid).toBeTruthy();
       const uuid = 'foo';
       editor = new LogFileEditor({ model, host, uuid });
-      expect(editor.uuid).to.equal('foo');
+      expect(editor.uuid).toBe('foo');
     });
   });
 
   describe('#selectionStyle', () => {
     it('should be the selection style of the editor', () => {
-      expect(editor.selectionStyle).to.deep.equal(
-        CodeEditor.defaultSelectionStyle
-      );
+      expect(editor.selectionStyle).toEqual(CodeEditor.defaultSelectionStyle);
     });
 
     it('should be settable', () => {
@@ -101,105 +95,105 @@ describe('CodeMirrorEditor', () => {
         color: 'black'
       };
       editor.selectionStyle = style;
-      expect(editor.selectionStyle).to.deep.equal(style);
+      expect(editor.selectionStyle).toEqual(style);
     });
   });
 
   describe('#editor', () => {
     it('should be the codemirror editor wrapped by the editor', () => {
       const cm = editor.editor;
-      expect(cm.getDoc()).to.equal(editor.doc);
+      expect(cm.getDoc()).toBe(editor.doc);
     });
   });
 
   describe('#doc', () => {
     it('should be the codemirror doc wrapped by the editor', () => {
       const doc = editor.doc;
-      expect(doc.getEditor()).to.equal(editor.editor);
+      expect(doc.getEditor()).toBe(editor.editor);
     });
   });
 
   describe('#lineCount', () => {
     it('should get the number of lines in the editor', () => {
-      expect(editor.lineCount).to.equal(1);
+      expect(editor.lineCount).toBe(1);
       editor.model.value.text = 'foo\nbar\nbaz';
-      expect(editor.lineCount).to.equal(3);
+      expect(editor.lineCount).toBe(3);
     });
   });
 
   describe('#getOption()', () => {
     it('should get whether line numbers should be shown', () => {
-      expect(editor.getOption('lineNumbers')).to.equal(false);
+      expect(editor.getOption('lineNumbers')).toBe(false);
     });
 
     it('should get whether horizontally scrolling should be used', () => {
-      expect(editor.getOption('lineWrap')).to.equal('on');
+      expect(editor.getOption('lineWrap')).toBe('on');
     });
 
     it('should get whether the editor is readonly', () => {
-      expect(editor.getOption('readOnly')).to.equal(false);
+      expect(editor.getOption('readOnly')).toBe(false);
     });
   });
 
   describe('#setOption()', () => {
     it('should set whether line numbers should be shown', () => {
       editor.setOption('lineNumbers', true);
-      expect(editor.getOption('lineNumbers')).to.equal(true);
+      expect(editor.getOption('lineNumbers')).toBe(true);
     });
 
     it('should set whether horizontally scrolling should be used', () => {
       editor.setOption('lineWrap', 'off');
-      expect(editor.getOption('lineWrap')).to.equal('off');
+      expect(editor.getOption('lineWrap')).toBe('off');
     });
 
     it('should set whether the editor is readonly', () => {
       editor.setOption('readOnly', true);
-      expect(editor.getOption('readOnly')).to.equal(true);
+      expect(editor.getOption('readOnly')).toBe(true);
     });
   });
 
   describe('#model', () => {
     it('should get the model used by the editor', () => {
-      expect(editor.model).to.equal(model);
+      expect(editor.model).toBe(model);
     });
   });
 
   describe('#lineHeight', () => {
     it('should get the text height of a line in the editor', () => {
-      expect(editor.lineHeight).to.be.above(0);
+      expect(editor.lineHeight).toBeGreaterThan(0);
     });
   });
 
   describe('#charWidth', () => {
     it('should get the character width in the editor', () => {
-      expect(editor.charWidth).to.be.above(0);
+      expect(editor.charWidth).toBeGreaterThan(0);
     });
   });
 
   describe('#isDisposed', () => {
     it('should test whether the editor is disposed', () => {
-      expect(editor.isDisposed).to.equal(false);
+      expect(editor.isDisposed).toBe(false);
       editor.dispose();
-      expect(editor.isDisposed).to.equal(true);
+      expect(editor.isDisposed).toBe(true);
     });
   });
 
   describe('#dispose()', () => {
     it('should dispose of the resources used by the editor', () => {
-      expect(editor.isDisposed).to.equal(false);
+      expect(editor.isDisposed).toBe(false);
       editor.dispose();
-      expect(editor.isDisposed).to.equal(true);
+      expect(editor.isDisposed).toBe(true);
       editor.dispose();
-      expect(editor.isDisposed).to.equal(true);
+      expect(editor.isDisposed).toBe(true);
     });
   });
 
   describe('#getLine()', () => {
     it('should get a line of text', () => {
       model.value.text = 'foo\nbar';
-      expect(editor.getLine(0)).to.equal('foo');
-      expect(editor.getLine(1)).to.equal('bar');
-      expect(editor.getLine(2)).to.be.undefined;
+      expect(editor.getLine(0)).toBe('foo');
+      expect(editor.getLine(1)).toBe('bar');
+      expect(editor.getLine(2)).toBeUndefined();
     });
   });
 
@@ -210,12 +204,12 @@ describe('CodeMirrorEditor', () => {
         column: 2,
         line: 1
       };
-      expect(editor.getOffsetAt(pos)).to.equal(6);
+      expect(editor.getOffsetAt(pos)).toBe(6);
       pos = {
         column: 2,
         line: 5
       };
-      expect(editor.getOffsetAt(pos)).to.equal(7);
+      expect(editor.getOffsetAt(pos)).toBe(7);
     });
   });
 
@@ -223,11 +217,11 @@ describe('CodeMirrorEditor', () => {
     it('should get the position for a given offset', () => {
       model.value.text = 'foo\nbar';
       let pos = editor.getPositionAt(6);
-      expect(pos.column).to.equal(2);
-      expect(pos.line).to.equal(1);
+      expect(pos.column).toBe(2);
+      expect(pos.line).toBe(1);
       pos = editor.getPositionAt(101);
-      expect(pos.column).to.equal(3);
-      expect(pos.line).to.equal(1);
+      expect(pos.column).toBe(3);
+      expect(pos.line).toBe(1);
     });
   });
 
@@ -235,7 +229,7 @@ describe('CodeMirrorEditor', () => {
     it('should undo one edit', () => {
       model.value.text = 'foo';
       editor.undo();
-      expect(model.value.text).to.equal('');
+      expect(model.value.text).toBe('');
     });
   });
 
@@ -244,7 +238,7 @@ describe('CodeMirrorEditor', () => {
       model.value.text = 'foo';
       editor.undo();
       editor.redo();
-      expect(model.value.text).to.equal('foo');
+      expect(model.value.text).toBe('foo');
     });
   });
 
@@ -253,32 +247,32 @@ describe('CodeMirrorEditor', () => {
       model.value.text = 'foo';
       editor.clearHistory();
       editor.undo();
-      expect(model.value.text).to.equal('foo');
+      expect(model.value.text).toBe('foo');
     });
   });
 
   describe('#focus()', () => {
     it('should give focus to the editor', () => {
-      expect(host.contains(document.activeElement)).to.equal(false);
+      expect(host.contains(document.activeElement)).toBe(false);
       editor.focus();
-      expect(host.contains(document.activeElement)).to.equal(true);
+      expect(host.contains(document.activeElement)).toBe(true);
     });
   });
 
   describe('#hasFocus()', () => {
     it('should test whether the editor has focus', () => {
-      expect(editor.hasFocus()).to.equal(false);
+      expect(editor.hasFocus()).toBe(false);
       editor.focus();
-      expect(editor.hasFocus()).to.equal(true);
+      expect(editor.hasFocus()).toBe(true);
     });
   });
 
   describe('#blur()', () => {
     it('should blur the editor', () => {
       editor.focus();
-      expect(host.contains(document.activeElement)).to.equal(true);
+      expect(host.contains(document.activeElement)).toBe(true);
       editor.blur();
-      expect(host.contains(document.activeElement)).to.equal(false);
+      expect(host.contains(document.activeElement)).toBe(false);
     });
   });
 
@@ -286,16 +280,16 @@ describe('CodeMirrorEditor', () => {
     describe('focus', () => {
       it('should add the focus class to the host', () => {
         simulate(editor.editor.getInputField(), 'focus');
-        expect(host.classList.contains('jp-mod-focused')).to.equal(true);
+        expect(host.classList.contains('jp-mod-focused')).toBe(true);
       });
     });
 
     describe('blur', () => {
       it('should remove the focus class from the host', () => {
         simulate(editor.editor.getInputField(), 'focus');
-        expect(host.classList.contains('jp-mod-focused')).to.equal(true);
+        expect(host.classList.contains('jp-mod-focused')).toBe(true);
         simulate(editor.editor.getInputField(), 'blur');
-        expect(host.classList.contains('jp-mod-focused')).to.equal(false);
+        expect(host.classList.contains('jp-mod-focused')).toBe(false);
       });
     });
   });
@@ -303,7 +297,7 @@ describe('CodeMirrorEditor', () => {
   describe('#refresh()', () => {
     it('should repaint the editor', () => {
       editor.refresh();
-      expect(editor).to.be.ok;
+      expect(editor).toBeTruthy();
     });
   });
 
@@ -317,13 +311,13 @@ describe('CodeMirrorEditor', () => {
       const disposable = editor.addKeydownHandler(handler);
       let evt = generate('keydown', { keyCode: ENTER });
       editor.editor.triggerOnKeyDown(evt);
-      expect(called).to.equal(1);
+      expect(called).toBe(1);
       disposable.dispose();
-      expect(disposable.isDisposed).to.equal(true);
+      expect(disposable.isDisposed).toBe(true);
 
       evt = generate('keydown', { keyCode: ENTER });
       editor.editor.triggerOnKeyDown(evt);
-      expect(called).to.equal(1);
+      expect(called).toBe(1);
     });
   });
 
@@ -331,7 +325,7 @@ describe('CodeMirrorEditor', () => {
     it('should set the size of the editor in pixels', () => {
       editor.setSize({ width: 100, height: 100 });
       editor.setSize(null);
-      expect(editor).to.be.ok;
+      expect(editor).toBeTruthy();
     });
   });
 
@@ -339,7 +333,7 @@ describe('CodeMirrorEditor', () => {
     it('should reveal the given position in the editor', () => {
       model.value.text = TEXT;
       editor.revealPosition({ line: 50, column: 0 });
-      expect(editor).to.be.ok;
+      expect(editor).toBeTruthy();
     });
   });
 
@@ -350,7 +344,7 @@ describe('CodeMirrorEditor', () => {
       const end = { line: 52, column: 0 };
       editor.setSelection({ start, end });
       editor.revealSelection(editor.getSelection());
-      expect(editor).to.be.ok;
+      expect(editor).toBeTruthy();
     });
   });
 
@@ -359,9 +353,9 @@ describe('CodeMirrorEditor', () => {
       model.value.text = TEXT;
       const coord = editor.getCoordinateForPosition({ line: 10, column: 1 });
       if (typeof process !== 'undefined') {
-        expect(coord.left).to.equal(0);
+        expect(coord.left).toBe(0);
       } else {
-        expect(coord.left).to.be.above(0);
+        expect(coord.left).toBeGreaterThan(0);
       }
     });
   });
@@ -371,8 +365,8 @@ describe('CodeMirrorEditor', () => {
       model.value.text = TEXT;
       const coord = editor.getCoordinateForPosition({ line: 10, column: 1 });
       const newPos = editor.getPositionForCoordinate(coord)!;
-      expect(newPos.line).to.be.ok;
-      expect(newPos.column).to.be.ok;
+      expect(newPos.line).toBeTruthy();
+      expect(newPos.column).toBeTruthy();
     });
   });
 
@@ -380,13 +374,13 @@ describe('CodeMirrorEditor', () => {
     it('should get the primary position of the cursor', () => {
       model.value.text = TEXT;
       let pos = editor.getCursorPosition();
-      expect(pos.line).to.equal(0);
-      expect(pos.column).to.equal(0);
+      expect(pos.line).toBe(0);
+      expect(pos.column).toBe(0);
 
       editor.setCursorPosition({ line: 12, column: 3 });
       pos = editor.getCursorPosition();
-      expect(pos.line).to.equal(12);
-      expect(pos.column).to.equal(3);
+      expect(pos.line).toBe(12);
+      expect(pos.column).toBe(3);
     });
   });
 
@@ -395,16 +389,16 @@ describe('CodeMirrorEditor', () => {
       model.value.text = TEXT;
       editor.setCursorPosition({ line: 12, column: 3 });
       const pos = editor.getCursorPosition();
-      expect(pos.line).to.equal(12);
-      expect(pos.column).to.equal(3);
+      expect(pos.line).toBe(12);
+      expect(pos.column).toBe(3);
     });
   });
 
   describe('#getSelection()', () => {
     it('should get the primary selection of the editor', () => {
       const selection = editor.getSelection();
-      expect(selection.start.line).to.equal(0);
-      expect(selection.end.line).to.equal(0);
+      expect(selection.start.line).toBe(0);
+      expect(selection.end.line).toBe(0);
     });
   });
 
@@ -414,8 +408,8 @@ describe('CodeMirrorEditor', () => {
       const start = { line: 50, column: 0 };
       const end = { line: 52, column: 0 };
       editor.setSelection({ start, end });
-      expect(editor.getSelection().start).to.deep.equal(start);
-      expect(editor.getSelection().end).to.deep.equal(end);
+      expect(editor.getSelection().start).toEqual(start);
+      expect(editor.getSelection().end).toEqual(end);
     });
 
     it('should remove any secondary cursors', () => {
@@ -430,7 +424,7 @@ describe('CodeMirrorEditor', () => {
       };
       editor.setSelections([range0, range1]);
       editor.setSelection(range1);
-      expect(editor.getSelections().length).to.equal(1);
+      expect(editor.getSelections().length).toBe(1);
     });
   });
 
@@ -447,8 +441,8 @@ describe('CodeMirrorEditor', () => {
       };
       editor.setSelections([range0, range1]);
       const selections = editor.getSelections();
-      expect(selections[0].start.line).to.equal(50);
-      expect(selections[1].end.line).to.equal(54);
+      expect(selections[0].start.line).toBe(50);
+      expect(selections[1].end.line).toBe(54);
     });
   });
 
@@ -465,25 +459,25 @@ describe('CodeMirrorEditor', () => {
       };
       editor.setSelections([range0, range1]);
       const selections = editor.getSelections();
-      expect(selections[0].start.line).to.equal(50);
-      expect(selections[1].end.line).to.equal(54);
+      expect(selections[0].start.line).toBe(50);
+      expect(selections[1].end.line).toBe(54);
     });
 
     it('should set a default selection for an empty array', () => {
       model.value.text = TEXT;
       editor.setSelections([]);
       const selection = editor.getSelection();
-      expect(selection.start.line).to.equal(0);
-      expect(selection.end.line).to.equal(0);
+      expect(selection.start.line).toBe(0);
+      expect(selection.end.line).toBe(0);
     });
   });
 
   describe('#onKeydown()', () => {
     it('should run when there is a keydown event on the editor', () => {
       const event = generate('keydown', { keyCode: UP_ARROW });
-      expect(editor.methods).to.not.contain('onKeydown');
+      expect(editor.methods).toEqual(expect.not.arrayContaining(['onKeydown']));
       editor.editor.triggerOnKeyDown(event);
-      expect(editor.methods).to.contain('onKeydown');
+      expect(editor.methods).toEqual(expect.arrayContaining(['onKeydown']));
     });
   });
 });

+ 11 - 12
tests/test-codemirror/src/factory.spec.ts → packages/codemirror/test/factory.spec.ts

@@ -1,7 +1,6 @@
 // Copyright (c) Jupyter Development Team.
-// Distributed under the terms of the Modified BSD License.
 
-import { expect } from 'chai';
+import 'jest';
 
 import { CodeEditor } from '@jupyterlab/codeeditor';
 
@@ -40,16 +39,16 @@ describe('CodeMirrorEditorFactory', () => {
   describe('#constructor()', () => {
     it('should create a CodeMirrorEditorFactory', () => {
       const factory = new CodeMirrorEditorFactory();
-      expect(factory).to.be.an.instanceof(CodeMirrorEditorFactory);
+      expect(factory).toBeInstanceOf(CodeMirrorEditorFactory);
     });
 
     it('should create a CodeMirrorEditorFactory', () => {
       const factory = new ExposeCodeMirrorEditorFactory(options);
-      expect(factory).to.be.an.instanceof(CodeMirrorEditorFactory);
-      expect(factory.inlineCodeMirrorConfig.extraKeys).to.deep.equal(
+      expect(factory).toBeInstanceOf(CodeMirrorEditorFactory);
+      expect(factory.inlineCodeMirrorConfig.extraKeys).toEqual(
         options.extraKeys
       );
-      expect(factory.documentCodeMirrorConfig.extraKeys).to.deep.equal(
+      expect(factory.documentCodeMirrorConfig.extraKeys).toEqual(
         options.extraKeys
       );
     });
@@ -59,7 +58,7 @@ describe('CodeMirrorEditorFactory', () => {
     it('should create a new editor', () => {
       const factory = new CodeMirrorEditorFactory();
       const editor = factory.newInlineEditor({ host, model });
-      expect(editor).to.be.an.instanceof(CodeMirrorEditor);
+      expect(editor).toBeInstanceOf(CodeMirrorEditor);
       editor.dispose();
     });
 
@@ -69,10 +68,10 @@ describe('CodeMirrorEditorFactory', () => {
         host,
         model
       }) as CodeMirrorEditor;
-      expect(editor).to.be.an.instanceof(CodeMirrorEditor);
+      expect(editor).toBeInstanceOf(CodeMirrorEditor);
       for (const key in Object.keys(options)) {
         const option = key as keyof CodeMirrorEditor.IConfig;
-        expect(editor.getOption(option)).to.equal(options[option]);
+        expect(editor.getOption(option)).toBe(options[option]);
       }
       editor.dispose();
     });
@@ -82,7 +81,7 @@ describe('CodeMirrorEditorFactory', () => {
     it('should create a new editor', () => {
       const factory = new CodeMirrorEditorFactory();
       const editor = factory.newDocumentEditor({ host, model });
-      expect(editor).to.be.an.instanceof(CodeMirrorEditor);
+      expect(editor).toBeInstanceOf(CodeMirrorEditor);
       editor.dispose();
     });
 
@@ -92,10 +91,10 @@ describe('CodeMirrorEditorFactory', () => {
         host,
         model
       }) as CodeMirrorEditor;
-      expect(editor).to.be.an.instanceof(CodeMirrorEditor);
+      expect(editor).toBeInstanceOf(CodeMirrorEditor);
       for (const key in Object.keys(options)) {
         const option = key as keyof CodeMirrorEditor.IConfig;
-        expect(editor.getOption(option)).to.equal(options[option]);
+        expect(editor.getOption(option)).toBe(options[option]);
       }
       editor.dispose();
     });

+ 11 - 12
tests/test-codemirror/src/mode.spec.ts → packages/codemirror/test/mode.spec.ts

@@ -1,7 +1,6 @@
 // Copyright (c) Jupyter Development Team.
-// Distributed under the terms of the Modified BSD License.
 
-import { expect } from 'chai';
+import 'jest';
 
 import CodeMirror from 'codemirror';
 
@@ -24,12 +23,12 @@ describe('Mode', () => {
         return {};
       });
       const spec = (await Mode.ensure('text/foo'))!;
-      expect(spec.name).to.equal('FOO');
+      expect(spec.name).toBe('FOO');
     });
 
     it('should load a bundled spec', async () => {
       const spec = (await Mode.ensure('application/json'))!;
-      expect(spec.name).to.equal('JSON');
+      expect(spec.name).toBe('JSON');
     });
 
     it('should add a spec loader', async () => {
@@ -48,26 +47,26 @@ describe('Mode', () => {
       CodeMirror.modeInfo.push(fakeMode('bar'));
 
       let spec = await Mode.ensure('bar');
-      expect(called).to.equal(1);
-      expect(loaded).to.equal(1);
-      expect(spec!.name).to.equal('BAR');
+      expect(called).toBe(1);
+      expect(loaded).toBe(1);
+      expect(spec!.name).toBe('BAR');
 
       spec = await Mode.ensure('python');
-      expect(called).to.equal(1);
-      expect(loaded).to.equal(1);
+      expect(called).toBe(1);
+      expect(loaded).toBe(1);
 
       try {
         spec = await Mode.ensure('APL');
       } catch (err) {
         // apparently one cannot use webpack `require` in jest
       }
-      expect(called).to.equal(2);
-      expect(loaded).to.equal(1);
+      expect(called).toBe(2);
+      expect(loaded).toBe(1);
     });
 
     it('should default to plain text', async () => {
       const spec = (await Mode.ensure('this is not a mode'))!;
-      expect(spec.name).to.equal('Plain Text');
+      expect(spec.name).toBe('Plain Text');
     });
   });
 });

+ 45 - 0
packages/codemirror/tsconfig.test.json

@@ -0,0 +1,45 @@
+{
+  "extends": "../../tsconfigbase.test",
+  "include": ["src/*", "test/*"],
+  "references": [
+    {
+      "path": "../apputils"
+    },
+    {
+      "path": "../codeeditor"
+    },
+    {
+      "path": "../coreutils"
+    },
+    {
+      "path": "../nbformat"
+    },
+    {
+      "path": "../observables"
+    },
+    {
+      "path": "../statusbar"
+    },
+    {
+      "path": "../../testutils"
+    },
+    {
+      "path": "../apputils"
+    },
+    {
+      "path": "../codeeditor"
+    },
+    {
+      "path": "../coreutils"
+    },
+    {
+      "path": "../nbformat"
+    },
+    {
+      "path": "../observables"
+    },
+    {
+      "path": "../statusbar"
+    }
+  ]
+}

+ 0 - 2
tests/test-codemirror/jest.config.js

@@ -1,2 +0,0 @@
-const func = require('@jupyterlab/testutils/lib/jest-config');
-module.exports = func('codemirror', __dirname);

+ 0 - 31
tests/test-codemirror/package.json

@@ -1,31 +0,0 @@
-{
-  "name": "@jupyterlab/test-codemirror",
-  "version": "2.1.0",
-  "private": true,
-  "scripts": {
-    "build": "tsc -b",
-    "clean": "rimraf build && rimraf coverage",
-    "coverage": "python run.py --coverage",
-    "test": "python run.py",
-    "watch": "python run.py --debug",
-    "watch:all": "python run.py --debug --watchAll",
-    "watch:src": "tsc -b --watch"
-  },
-  "dependencies": {
-    "@jupyterlab/codeeditor": "^2.1.0",
-    "@jupyterlab/codemirror": "^2.1.0",
-    "@jupyterlab/testutils": "^2.1.0",
-    "chai": "^4.2.0",
-    "codemirror": "~5.53.2",
-    "jest": "^25.2.3",
-    "jest-junit": "^10.0.0",
-    "simulate-event": "~1.4.0",
-    "ts-jest": "^25.2.1"
-  },
-  "devDependencies": {
-    "@types/chai": "^4.2.7",
-    "@types/jest": "^24.0.23",
-    "rimraf": "~3.0.0",
-    "typescript": "~3.7.3"
-  }
-}

+ 0 - 8
tests/test-codemirror/run.py

@@ -1,8 +0,0 @@
-# Copyright (c) Jupyter Development Team.
-# Distributed under the terms of the Modified BSD License.
-
-import os.path as osp
-from jupyterlab.tests.test_app import run_jest
-
-if __name__ == '__main__':
-    run_jest(osp.dirname(osp.realpath(__file__)))

+ 0 - 21
tests/test-codemirror/tsconfig.json

@@ -1,21 +0,0 @@
-{
-  "extends": "../../tsconfigbase",
-  "compilerOptions": {
-    "outDir": "build",
-    "types": ["jest", "node"],
-    "composite": false,
-    "rootDir": "src"
-  },
-  "include": ["src/*"],
-  "references": [
-    {
-      "path": "../../packages/codeeditor"
-    },
-    {
-      "path": "../../packages/codemirror"
-    },
-    {
-      "path": "../../testutils"
-    }
-  ]
-}