Testing services
To check that your services are working as you intend, you can write tests specifically for them.
Last updated
Was this helpful?
To check that your services are working as you intend, you can write tests specifically for them.
Last updated
Was this helpful?
The is the most important of the Angular testing utilities. The creates a dynamically-constructed Angular test module that emulates an Angular .
The TestBed.configureTestingModule()
method takes a metadata object that can have most of the properties of an .
To test a service, you set the providers
metadata property with an array of the services that you'll test or mock.
For example: