Quiz Yourself on Mocking API Calls
Test your knowledge of how to mock API calls with HttpClientTestingModule.
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],
});
Question 1 of 70 attempted
Get hands-on with 1400+ tech skills courses.