Browse Source

corrected test of console history

Dror Speiser 7 years ago
parent
commit
0ef7d51c3d
1 changed files with 6 additions and 8 deletions
  1. 6 8
      test/src/console/history.spec.ts

+ 6 - 8
test/src/console/history.spec.ts

@@ -132,11 +132,10 @@ describe('console/history', () => {
 
     describe('#back()', () => {
 
-      it('should return void promise if no history exists', (done) => {
+      it('should return an empty string if no history exists', () => {
         let history = new ConsoleHistory({ session });
-        history.back('').then(result => {
-          expect(result).to.be(void 0);
-          done();
+        return history.back('').then(result => {
+          expect(result).to.be('');
         });
       });
 
@@ -155,11 +154,10 @@ describe('console/history', () => {
 
     describe('#forward()', () => {
 
-      it('should return void promise if no history exists', (done) => {
+      it('should return an emptry string if no history exists', () => {
         let history = new ConsoleHistory({ session });
-        history.forward('').then(result => {
-          expect(result).to.be(void 0);
-          done();
+        return history.forward('').then(result => {
+          expect(result).to.be('');
         });
       });