'use strict';

const chai = require('chai');
const chaiAsPromised = require('chai-as-promised');

chai.should();
chai.use(chaiAsPromised);

const news = require('../index.js');

describe('News CLI', () => {
  it('should get the news', (done) => {
    let helper = news(null, {});
    return helper.should.be.fulfilled.and.notify(done);
  });

  it('should get the top news from techcrunch by default', (done) => {
    let helper = news(null, {});
    return helper.should.eventually.have.property('articles').notify(done);
  });

  it('should get the latest news from hackernews', (done) => {
    let helper = news('hackernews', {sort: 'latest'});
    return helper.should.eventually.have.property('articles').notify(done);
  });
});

@@ -221,36 +221,32 @@
 get the news', (
-done
 ) =%3E %7B%0A    let h
@@ -310,25 +310,8 @@
 lled
-.and.notify(done)
 ;%0A  
@@ -371,28 +371,24 @@
  default', (
-done
 ) =%3E %7B%0A    l
@@ -472,37 +472,24 @@
 ('articles')
-.notify(done)
 ;%0A  %7D);%0A%0A  i
@@ -537,20 +537,16 @@
 news', (
-done
 ) =%3E %7B%0A 
@@ -664,21 +664,8 @@
 es')
-.notify(done)
 ;%0A  

Remove done callbacks