Quiz Yourself on Mocking API Calls
Test your knowledge of how to mock API calls with HttpClientTestingModule.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
How do you use HttpClientTestingModule
in the TestBed
configuration?
A.
TestBed.configureTestingModule({
providers: [MyService],
declarations: [HttpClientTestingModule],
});
B.
TestBed.configureTestingModule({
providers: [MyService, HttpClient]
});
C.
TestBed.configureTestingModule({
providers: [MyService],
imports: [HttpClientTestingModule],
});
D.
TestBed.configureTestingModule({
providers: [MyService],
modules: [HttpClientTestingModule],
});
1 / 7