该声明未包含在下面的图像中,如果有遗漏,请原谅我,
也请在我的单元测试用例代码下面找到。
test('getAllEndpoints method should retrun the respone', (done: Function) => {
spyOn(submissionService, 'getAllEndpoints').and.returnValue(of(mockMarketEnpointEmptyResponse));
submissionService.getAllEndpoints().subscribe((response: IGetAllEndPoints) => {
expect(response).toEqual(mockMarketEnpointEmptyResponse);
expect(response.responseObject.endpoint).toEqual([]);
expect(response.responseObject.market).toEqual([]);
expect(response.responseObject).not.toBeNull();
expect(response.responseObject).not.toBeUndefined();
expect(response.responseObject).toBeTruthy();
component.data.isUpdate = true;
component.endPointList = response.responseObject.endpoint;
component.marketList = response.responseObject.market;
component.showErrorNotificationForFilters();
done();
});
});
我不知道如何用笑话来掩盖此声明,请帮助我。