AngularJS
Unit Testing AngularJS Filters and Services with Karma & Jasmine
AngularJS Unit Testing AngularJS Filters and Services with Karma - - PowerPoint PPT Presentation
AngularJS Unit Testing AngularJS Filters and Services with Karma & Jasmine Filters Filters can be added in AngularJS to format or transform data AngularJS provides filters to currency - Format a number to a currency format. o date -
Unit Testing AngularJS Filters and Services with Karma & Jasmine
transform data
elements/characters.
character, |
character, |
filter factory function with your module
the filter being tested.
tests for sample application.
together using dependency injection (DI)
across your app
application component depends on it
to the single instance generated by the service factory
always start with $ (e.g. $http).
module
module's config function
to the app
the service being tested.
dependencies in a beforeEach block
services
being tested
being tested
custom service tests for sample application.
filters/
controllers-providers/
arjs-tests-with-an-http-mock.aspx