浏览代码

Update tests

Steven Silvester 8 年之前
父节点
当前提交
7d894f646c

+ 6 - 6
test/src/docregistry/default.spec.ts

@@ -101,16 +101,16 @@ describe('docmanager/default', () => {
 
     });
 
-    describe('#type', () => {
+    describe('#contentType', () => {
 
       it('should get the file type', () => {
         let factory = new Base64ModelFactory();
-        expect(factory.fileType).to.be('file');
+        expect(factory.contentType).to.be('file');
       });
 
     });
 
-    describe('#format', () => {
+    describe('#fileFormat', () => {
 
       it('should get the file format', () => {
         let factory = new Base64ModelFactory();
@@ -351,16 +351,16 @@ describe('docmanager/default', () => {
 
     });
 
-    describe('#type', () => {
+    describe('#contentType', () => {
 
       it('should get the file type', () => {
         let factory = new TextModelFactory();
-        expect(factory.fileType).to.be('file');
+        expect(factory.contentType).to.be('file');
       });
 
     });
 
-    describe('#format', () => {
+    describe('#fileFormat', () => {
 
       it('should get the file format', () => {
         let factory = new TextModelFactory();

+ 2 - 2
test/src/filebrowser/model.spec.ts

@@ -4,7 +4,7 @@
 import expect = require('expect.js');
 
 import {
-  createServiceManager
+  ServiceManager
 } from 'jupyter-js-services';
 
 import {
@@ -19,7 +19,7 @@ describe('filebrowser/model', () => {
     describe('#constructor()', () => {
 
       it('should construct a new file browser model', (done) => {
-        createServiceManager().then(manager => {
+        ServiceManager.create().then(manager => {
           let model = new FileBrowserModel({ manager });
           expect(model).to.be.a(FileBrowserModel);
           done();

+ 3 - 3
test/src/notebook/notebook/modelfactory.spec.ts

@@ -25,16 +25,16 @@ describe('notebook/notebook/modelfactory', () => {
 
     });
 
-    describe('#type', () => {
+    describe('#contentType', () => {
 
       it('should get the file type', () => {
         let factory = new NotebookModelFactory();
-        expect(factory.fileType).to.be('notebook');
+        expect(factory.contentType).to.be('notebook');
       });
 
     });
 
-    describe('#format', () => {
+    describe('#fileFormat', () => {
 
       it('should get the file format', () => {
         let factory = new NotebookModelFactory();

+ 2 - 2
test/src/utils.ts

@@ -8,7 +8,7 @@ import {
 } from 'simulate-event';
 
 import {
-  createServiceManager, utils, IServiceManager
+  ServiceManager, utils, IServiceManager
 } from 'jupyter-js-services';
 
 import {
@@ -132,7 +132,7 @@ function dismissDialog(host: HTMLElement = document.body): Promise<void> {
  */
 namespace Private {
   export
-  const servicePromise: Promise<IServiceManager> = createServiceManager();
+  const servicePromise: Promise<IServiceManager> = ServiceManager.create();
 
   export
   const textFactory = new TextModelFactory();