Browse Source

Update dialog tests

Steven Silvester 8 years ago
parent
commit
e1ab664d40
1 changed files with 5 additions and 5 deletions
  1. 5 5
      test/src/dialog/dialog.spec.ts

+ 5 - 5
test/src/dialog/dialog.spec.ts

@@ -16,13 +16,13 @@ import {
 } from '../utils';
 
 
-describe('jupyter-ui', () => {
+describe('dialog/index', () => {
 
   describe('showDialog()', () => {
 
     it('should accept zero arguments', (done) => {
       showDialog().then(result => {
-        expect(result).to.be(null);
+        expect(result.text).to.be('CANCEL');
         done();
       });
       Promise.resolve().then(() => {
@@ -42,7 +42,7 @@ describe('jupyter-ui', () => {
         okText: 'Yep'
       };
       showDialog(options).then(result => {
-        expect(result).to.be(null);
+        expect(result.text).to.be('CANCEL');
         done();
       });
       Promise.resolve().then(() => {
@@ -67,7 +67,7 @@ describe('jupyter-ui', () => {
     it('should accept an input body', (done) => {
       let body = document.createElement('input');
       showDialog({ body }).then(result => {
-        expect(result).to.be(null);
+        expect(result.text).to.be('CANCEL');
         done();
       });
       dismissDialog();
@@ -101,7 +101,7 @@ describe('jupyter-ui', () => {
     it('should ignore context menu events', (done) => {
       let body = document.createElement('div');
       showDialog({ body }).then(result => {
-        expect(result).to.be(null);
+        expect(result.text).to.be('CANCEL');
         done();
       });
       Promise.resolve().then(() => {