瀏覽代碼

update tests

Steven Silvester 8 年之前
父節點
當前提交
5e24e2c2b5
共有 2 個文件被更改,包括 3 次插入13 次删除
  1. 2 12
      test/src/codemirror/editor.spec.ts
  2. 1 1
      test/src/notebook/widget.spec.ts

+ 2 - 12
test/src/codemirror/editor.spec.ts

@@ -384,25 +384,15 @@ describe('CodeMirrorEditor', () => {
 
   });
 
-  describe('#getCoordinateForPosition()', () => {
+  describe('#getCoordinate()', () => {
 
     it('should get the window coordinates given a cursor position', () => {
-      let coord = editor.getCoordinateForPosition({ line: 10, column: 1 });
+      let coord = editor.getCoordinate({ line: 10, column: 1 });
       expect(coord.left).to.be.above(0);
     });
 
   });
 
-  describe('#getPositionForCoordinate()', () => {
-
-    it('should get the window coordinates given a cursor position', () => {
-      let pos = { line: 10, column: 1 };
-      let coord = editor.getCoordinateForPosition(pos);
-      expect(editor.getPositionForCoordinate(coord)).to.eql(pos);
-    });
-
-  });
-
   describe('#getCursorPosition()', () => {
 
     it('should get the primary position of the cursor', () => {

+ 1 - 1
test/src/notebook/widget.spec.ts

@@ -904,7 +904,7 @@ describe('notebook/notebook/widget', () => {
           expect(child.rendered).to.be(true);
           expect(widget.mode).to.be('command');
           simulate(child.node, 'dblclick');
-          expect(widget.mode).to.be('edit');
+          expect(widget.mode).to.be('command');
           expect(child.rendered).to.be(false);
         });