5. Adding tests - marcinkopka/todo-list-app GitHub Wiki

Tests has been created by using Jasmine.
Jasmine is an open source testing framework for JavaScript.
To start test simply start SpecRunner.html file located in application main directory in test folder.
To create or modify tests open and modify ControllerSpec.js file located in the same directory.


9 tests has been added to the existing tests:

  • should show entries on start-up
  • should show active entries
  • should show completed entries
  • should highlight "All" filter by default
  • should highlight "Active" filter when switching to active view
  • should toggle all todos to completed
  • should update the view
  • should add a new todo to the model
  • should remove an entry from the model

All tests were successful (see image below).

jasmineTests.jpg