瀏覽代碼

Update console panel contentfactory tests

Steven Silvester 8 年之前
父節點
當前提交
47ca910025
共有 1 個文件被更改,包括 22 次插入3 次删除
  1. 22 3
      test/src/console/panel.spec.ts

+ 22 - 3
test/src/console/panel.spec.ts

@@ -147,14 +147,32 @@ describe('console/panel', () => {
 
     });
 
-    describe('#contentFactory', () => {
+    describe('.ContentFactory', () => {
+
+      describe('#constructor', () => {
+
+        it('should create a new code console factory', () => {
+          let factory = new ConsolePanel.ContentFactory({
+            consoleContentFactory: createConsoleFactory()
+          });
+          expect(factory).to.be.a(ConsolePanel.ContentFactory);
+        });
+
+      });
+
+      describe('#consoleContentFactory', () => {
+
+        it('should be the console content factory used by the panel factory', () => {
+          expect(contentFactory.consoleContentFactory).to.be.a(CodeConsole.ContentFactory);
+        });
+
+      });
 
       describe('#createConsole()', () => {
 
         it('should create a notebook widget', () => {
-          let consoleContentFactory = createConsoleFactory();
           let options = {
-            contentFactory: consoleContentFactory,
+            contentFactory: contentFactory.consoleContentFactory,
             rendermime,
             mimeTypeService,
             session
@@ -194,6 +212,7 @@ describe('console/panel', () => {
 
     });
 
+
   });
 
 });