Testing filters with Jasmine/Karma
Objectives
- Write unit tests for our custom filters
Instructions
In this repo we've got two filters.
The first filter is FavoriteFood
- it will filter an array of objects depending on the favoriteFood
property in the object. Test that this filter is filtering a mocked example list of people correctly (create a small array of fake people objects with a name
and favoriteFood
).
The second is a filter to remove all the vowels in a string. Test that this removes every vowel in any string given to the filter.
Make sure you run all the specs once you've written them and that they pass!