File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
projects/testing-library/src/lib Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -137,10 +137,12 @@ export async function render<SutType, WrapperType = SutType>(
137137 attributes : boolean ;
138138 characterData : boolean ;
139139 } ;
140- } = { container : fixture . nativeElement , interval : 50 } ,
140+ } = { container : fixture . nativeElement } ,
141141 ) : Promise < T > {
142- const interval = setInterval ( detectChanges , options . interval ) ;
143- return waitFor < T > ( callback , options ) . finally ( ( ) => clearInterval ( interval ) ) ;
142+ return waitFor < T > ( ( ) => {
143+ detectChanges ( ) ;
144+ return callback ( ) ;
145+ } , options ) ;
144146 }
145147
146148 function componentWaitForElementToBeRemoved < T > (
@@ -155,10 +157,12 @@ export async function render<SutType, WrapperType = SutType>(
155157 attributes : boolean ;
156158 characterData : boolean ;
157159 } ;
158- } = { container : fixture . nativeElement , interval : 50 } ,
160+ } = { container : fixture . nativeElement } ,
159161 ) : Promise < T > {
160- const interval = setInterval ( detectChanges , options . interval ) ;
161- return waitForElementToBeRemoved < T > ( callback , options ) . finally ( ( ) => clearInterval ( interval ) ) ;
162+ return waitForElementToBeRemoved < T > ( ( ) => {
163+ detectChanges ( ) ;
164+ return callback ( ) ;
165+ } , options ) ;
162166 }
163167
164168 return {
You can’t perform that action at this time.
0 commit comments