Index

src/lib/mock.ts

collectMethodNames
collectMethodNames(proto)
Parameters :
Name Optional
proto No
Returns : Array<string>
createMock
createMock(type: Type)

Creates a spy object for a class where all the methods of the class (and of its superclasses) are spies. I.e., for a class UserService with methods get(), create(), update() and delete(), calling createMock(UserService) is equivalent to calling jasmine.createSpyObj<UserService>('UserService', ['get', 'create', 'update', 'delete']).

Parameters :
Name Type Optional Description
type Type No

the type to mock (usually a service class)

Returns : jasmine.SpyObj<T>

src/lib/providers.ts

provideAutomaticChangeDetection
provideAutomaticChangeDetection()

Provide function which returns the provider { provide: ComponentFixtureAutoDetect, useValue: true }. This provider can be added to the testing module to configure the component testers (and the underlying ComponentFixture) in automatic mode:

Example :
TestBed.configureTestingModule({ providers: [provideAutomaticChangeDetection()] });
Returns : EnvironmentProviders

src/lib/route.ts

stubRoute
stubRoute(options?: ActivatedRouteStubOptions)

Creates a new ActivatedRouteStub, by calling its constructor.

Parameters :
Name Type Optional
options ActivatedRouteStubOptions Yes
Returns : ActivatedRouteStub

results matching ""

    No results matching ""