Procházet zdrojové kódy

Update inspector tests.

Afshin Darian před 8 roky
rodič
revize
6cde1532cb
1 změnil soubory, kde provedl 21 přidání a 0 odebrání
  1. 21 0
      test/src/inspector/inspector.spec.ts

+ 21 - 0
test/src/inspector/inspector.spec.ts

@@ -76,6 +76,27 @@ describe('inspector/index', () => {
 
     });
 
+    describe('#dispose()', () => {
+
+      it('should dispose of the resources used by the inspector', () => {
+        let options: Inspector.IOptions = {};
+        let widget = new Inspector(options);
+        expect(widget.isDisposed).to.be(false);
+        widget.dispose();
+        expect(widget.isDisposed).to.be(true);
+      });
+
+      it('should be a no-op if called more than once', () => {
+        let options: Inspector.IOptions = {};
+        let widget = new Inspector(options);
+        expect(widget.isDisposed).to.be(false);
+        widget.dispose();
+        widget.dispose();
+        expect(widget.isDisposed).to.be(true);
+      });
+
+    });
+
   });
 
 });