Ian Rose 8 anni fa
parent
commit
be833c18ae
2 ha cambiato i file con 2 aggiunte e 10 eliminazioni
  1. 1 9
      test/src/notebook/model.spec.ts
  2. 1 1
      test/src/notebook/widget.spec.ts

+ 1 - 9
test/src/notebook/model.spec.ts

@@ -108,7 +108,7 @@ describe('notebook/notebook/model', () => {
         model.cells.undo();
         expect(model.cells.length).to.be(2);
         expect(model.cells.at(1).value.text).to.be('foo');
-        expect(model.cells.at(1)).to.not.be(cell);  // should be a clone.
+        expect(model.cells.at(1)).to.be(cell);  // should be ===.
       });
 
       context('cells `changed` signal', () => {
@@ -129,14 +129,6 @@ describe('notebook/notebook/model', () => {
           expect(model.dirty).to.be(true);
         });
 
-        it('should dispose of old cells', () => {
-          let model = new NotebookModel();
-          let cell = model.contentFactory.createCodeCell({});
-          model.cells.pushBack(cell);
-          model.cells.clear();
-          expect(cell.isDisposed).to.be(true);
-        });
-
         it('should add a new code cell when cells are cleared', (done) => {
           let model = new NotebookModel();
           model.cells.clear();

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

@@ -282,7 +282,7 @@ describe('notebook/widget', () => {
           let cell = widget.model.cells.at(1);
           let child = widget.widgets[1];
           widget.model.cells.remove(cell);
-          expect(cell.isDisposed).to.be(true);
+          expect(cell.isDisposed).to.be(false);
           expect(child.isDisposed).to.be(true);
         });