For this project I was given a web-based application that reads RSS feeds. The original developer of this application saw the value in testing, and started writing their first test suite! Unfortunately, they decided to move on to start their own company and left an application with an incomplete test suite which I was tasked to complete. I used Jasmine to write a number of tests.
You can view the completed project here
OR
- Download/clone this repository and open in your favorite code editor
- Run
node -v
on the terminal or command line. If nothing shows up or you get an error, Install Node - Run
npm install -g http-server
- Then run
http-server -o
in the project directory
I was tasked to write the following tests in different test suites. Some tests required asynchronous function so I used callbacks - the done()
argument within call to beforeEach()
- A test that loops through each feed in the
allFeeds
object and ensures it has a URL defined and that the URL is not empty. - A test that loops through each feed in the
allFeeds
object and ensures it has a name defined and that the name is not empty. - A test that ensures the menu element is hidden by default under "The Menu" test suite.
- Test that ensures the menu changes visibility when the menu icon is clicked.
- A test that ensures when the
loadFeed
function is called and completes its work, there is at least a single.entry
element within the.feed
container. - A test that ensures when a new feed is loaded by the
loadFeed
function that the content actually changes