Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion feedreader.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,30 @@ $(function () {
it('are defined', function () {
let expect = chai.expect;
expect(allFeeds).to.not.be.undefined;
expect(allFeeds.length).to.be.above(0);
expect(allFeeds.length).to.be.above(3);
});


// This test checks whether all the url field are defined and are not empty.
it('should have defined Urls', function () {
// Test here

let expect = chai.expect;
allFeeds.forEach((feeds) => {
expect(feeds.url).to.not.be.undefined;
});

});

// This test check whether all the feed names are defined and are not empty.
it('should have defined names', function () {
// Test here

let expect = chai.expect;
allFeeds.forEach((feeds) => {
expect(feeds.name).to.not.be.undefined;
});

});
});

Expand All @@ -62,6 +72,11 @@ $(function () {

// Test to check the entries are not empty.
it(`should not be empty for feeds`, (done) => {
let expect=chai.expect;
loadFeed(0,(result,status) => {
expect(status).to.be.equal("success");
return done();
});
done();
})
})
Expand Down