You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that autoDetectChanges feature is useful for testing.
so, I tried to change following code, and run test.
as result of test is passing same as before the change.
fake-async_test.ts
it('should count down and throw rock',fakeAsync(()=>{letfixture;builder.createAsync(RockPaperScissors).then((compFixture: ComponentFixture<RockPaperScissors>)=>{fixture=compFixture;fixture.autoDetectChanges();// <= using autoDetectChanges});tick();letoutput=fixture.debugElement.query(By.css('span')).nativeElement;fixture.debugElement.query(By.css('button')).nativeElement.click();// fixture.detectChanges(); // <= comment outexpect(output.textContent).toEqual('3');
....
What is difference between autoDetectChanges and detectChanges in this case?
If both of same. Which do you think better?
The text was updated successfully, but these errors were encountered:
@juliemr Thanks for your great presentation.
I have a few question about
fake-async_test.ts
.I think that
autoDetectChanges
feature is useful for testing.so, I tried to change following code, and run test.
as result of test is passing same as before the change.
fake-async_test.ts
What is difference between
autoDetectChanges
anddetectChanges
in this case?If both of same. Which do you think better?
The text was updated successfully, but these errors were encountered: