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>(
137
137
attributes : boolean ;
138
138
characterData : boolean ;
139
139
} ;
140
- } = { container : fixture . nativeElement , interval : 50 } ,
140
+ } = { container : fixture . nativeElement } ,
141
141
) : 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 ) ;
144
146
}
145
147
146
148
function componentWaitForElementToBeRemoved < T > (
@@ -155,10 +157,12 @@ export async function render<SutType, WrapperType = SutType>(
155
157
attributes : boolean ;
156
158
characterData : boolean ;
157
159
} ;
158
- } = { container : fixture . nativeElement , interval : 50 } ,
160
+ } = { container : fixture . nativeElement } ,
159
161
) : 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 ) ;
162
166
}
163
167
164
168
return {
You can’t perform that action at this time.
0 commit comments