-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathfeedreader.js
More file actions
77 lines (61 loc) · 2.25 KB
/
feedreader.js
File metadata and controls
77 lines (61 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/* feedreader.js
*
* This is the spec file that Jasmine will read and contains
* all of the tests that will be run against your application.
*/
/* We're placing all of our tests within the $() function,
* since some of these tests may require DOM elements. We want
* to ensure they don't run until the DOM is ready.
*/
$(function () {
/* This is our first test suite - a test suite just contains
* a related set of tests. This suite is all about the RSS
* feeds definitions, the allFeeds variable in our application.
*/
describe('RSS Feeds', function () {
/* This is our first test - it tests to make sure that the
* allFeeds variable has been defined and that it is not
* empty. Experiment with this before you get started on
* the rest of this project. What happens when you change
* allFeeds in app.js to be an empty array and refresh the
* page?
*/
it('are defined', function () {
let expect = chai.expect;
expect(allFeeds).to.not.be.undefined;
expect(allFeeds.length).to.be.above(0);
});
// This test checks whether all the url field are defined and are not empty.
it('should have defined Urls', function () {
// Test here
});
// This test check whether all the feed names are defined and are not empty.
it('should have defined names', function () {
// Test here
});
});
describe('The Menu', () => {
// Test to check node hidden by default.
it('should be hidden by default', () => {
// test here
});
// A test that ensures the menu changes visibility when the menu icon is clicked.
// This test have two expectations: does the menu display itself when clicked, and does it hide when clicked again?
it('should change visibility when the menu icon is clicked', (done) => {
done();
});
})
describe('Initial Entries', () => {
let feedContainer, id;
// Test to check the entries are not empty.
it(`should not be empty for feeds`, (done) => {
done();
})
})
describe('New Feed Selection', () => {
// A test that ensures when a new feed is loaded by the loadFeed function that the content actually changes.
it(`should change content for feeds`, (done) => {
done();
})
})
}());