Steven Silvester %!s(int64=8) %!d(string=hai) anos
pai
achega
92fe00142c
Modificáronse 1 ficheiros con 1 adicións e 12 borrados
  1. 1 12
      test/src/csvviewer/widget.spec.ts

+ 1 - 12
test/src/csvviewer/widget.spec.ts

@@ -11,10 +11,6 @@ import {
   ServiceManager
 } from '@jupyterlab/services';
 
-import {
-  CSVModel
-} from '@jupyterlab/csvviewer';
-
 import {
   CSVViewer
 } from '@jupyterlab/csvviewer';
@@ -23,10 +19,6 @@ import {
   Context, DocumentRegistry, TextModelFactory
 } from '@jupyterlab/docregistry';
 
-import {
-  CSV_DATA
-} from './data.csv';
-
 
 function createContext(): Context<DocumentRegistry.IModel> {
   let factory = new TextModelFactory();
@@ -55,6 +47,7 @@ describe('csvviewer/widget', () => {
     describe('#context', () => {
 
       it('should be the context for the file', () => {
+        let widget = new CSVViewer({ context });
         expect(widget.context).to.be(context);
       });
 
@@ -65,20 +58,16 @@ describe('csvviewer/widget', () => {
       it('should dispose of the resources held by the widget', () => {
         let widget = new CSVViewer({ context });
         expect(widget.isDisposed).to.be(false);
-        expect(widget.model).to.be.ok();
         widget.dispose();
         expect(widget.isDisposed).to.be(true);
-        expect(widget.model).to.not.be.ok();
       });
 
       it('should be safe to call multiple times', () => {
         let widget = new CSVViewer({ context });
         expect(widget.isDisposed).to.be(false);
-        expect(widget.model).to.be.ok();
         widget.dispose();
         widget.dispose();
         expect(widget.isDisposed).to.be(true);
-        expect(widget.model).to.not.be.ok();
       });
 
     });