Quellcode durchsuchen

More test updates

Steven Silvester vor 8 Jahren
Ursprung
Commit
ac5a78464e

+ 6 - 2
test/src/notebook/cells/model.spec.ts

@@ -3,6 +3,10 @@
 
 import expect = require('expect.js');
 
+import {
+  toArray
+} from 'phosphor/lib/algorithm/iteration';
+
 import {
   IChangedArgs
 } from '../../../../lib/common/interfaces';
@@ -235,9 +239,9 @@ describe('notebook/cells/model', () => {
       it('should get a list of user metadata keys', () => {
         let model = new CellModel();
         let cursor = model.getMetadata('foo');
-        expect(model.listMetadata()).to.be.empty();
+        expect(toArray(model.listMetadata())).to.be.empty();
         cursor.setValue(1);
-        expect(model.listMetadata()).to.eql(['foo']);
+        expect(toArray(model.listMetadata())).to.eql(['foo']);
       });
 
     });

+ 7 - 3
test/src/notebook/notebook/model.spec.ts

@@ -3,6 +3,10 @@
 
 import expect = require('expect.js');
 
+import {
+  toArray
+} from 'phosphor/lib/algorithm/iteration';
+
 import {
   indexOf
 } from 'phosphor/lib/algorithm/searching';
@@ -458,12 +462,12 @@ describe('notebook/notebook/model', () => {
       it('should list the metadata namespace keys for the notebook', () => {
         let model = new NotebookModel();
         let keys = ['kernelspec', 'language_info', 'orig_nbformat'];
-        expect(model.listMetadata()).to.eql(keys);
+        expect(toArray(model.listMetadata())).to.eql(keys);
         let cursor = model.getMetadata('foo');
-        expect(model.listMetadata()).to.eql(keys);
+        expect(toArray(model.listMetadata())).to.eql(keys);
         cursor.setValue(1);
         keys.push('foo');
-        expect(model.listMetadata()).to.eql(keys);
+        expect(toArray(model.listMetadata())).to.eql(keys);
       });
 
     });

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

@@ -362,7 +362,7 @@ describe('notebook/notebook/widget', () => {
 
     });
 
-    describe('#childAt()', () => {
+    describe('#widgets', () => {
 
       it('should get the child widget at a specified index', () => {
         let widget = createWidget();
@@ -376,10 +376,6 @@ describe('notebook/notebook/widget', () => {
         expect(child).to.be(void 0);
       });
 
-    });
-
-    describe('#childCount()', () => {
-
       it('should get the number of child widgets', () => {
         let widget = createWidget();
         expect(widget.widgets.length).to.be(1);

+ 1 - 5
test/src/notebook/output-area/widget.spec.ts

@@ -282,17 +282,13 @@ describe('notebook/output-area/widget', () => {
 
     });
 
-    describe('#childAt()', () => {
+    describe('#widgets', () => {
 
       it('should get the child widget at the specified index', () => {
         let widget = createWidget();
         expect(widget.widgets.at(0)).to.be.a(Widget);
       });
 
-    });
-
-    describe('#childCount()', () => {
-
       it('should get the number of child widgets', () => {
         let widget = createWidget();
         expect(widget.widgets.length).to.be(5);