休息api调用语句不包含使用角度玩笑

时间:2019-05-02 04:54:27

标签: jestjs angular7

该声明未包含在下面的图像中,如果有遗漏,请原谅我,

enter image description here

也请在我的单元测试用例代码下面找到。

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();
        });
    });

我不知道如何用笑话来掩盖此声明,请帮助我。

0 个答案:

没有答案