我有此测试可以成功返回“ SPEC HAS NOT EXPECTATION”,您有什么主意吗?也许我没有遵循最佳实践;
editComponent has been declared into the Test.bed into the declaration[]
it('test',fakeAsync(() => {
fixture.whenStable().then(() => {
editComponent = component.editComponent;
editComponent.ruleForm = new FormGroup({
title: new FormControl('test field'),cause: new FormControl('test field'),});
fixture.detectChanges();
spyOn(ruleEditComponent,'updateRule').withArgs(activeIssueId);
component.saveRuleDetails(activeIssueId);
expect(editComponent.createRule).toHaveBeenCalledWith(activeIssueId);
});
}));
当测试返回SPEC不能预期吗?