File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -235,12 +235,13 @@ describe('annotator/frame-observer', () => {
235
235
236
236
const unsubscribe = onDocumentReady ( frame , callback ) ;
237
237
await waitForCall ( callback ) ;
238
+ callback . resetHistory ( ) ;
238
239
239
240
unsubscribe ( ) ;
240
241
frame . src = sameOriginURL + '?v2' ;
241
242
await waitForEvent ( frame , 'load' ) ;
242
243
243
- assert . calledOnce ( callback ) ;
244
+ assert . notCalled ( callback ) ;
244
245
} ) ;
245
246
246
247
it ( 'does not start polling if "unload" event is received after subscription is canceled' , async ( ) => {
@@ -253,6 +254,7 @@ describe('annotator/frame-observer', () => {
253
254
const unsubscribe = onDocumentReady ( frame , callback ) ;
254
255
clock . tick ( ) ;
255
256
assert . calledOnce ( callback ) ;
257
+ callback . resetHistory ( ) ;
256
258
257
259
const contentWindow = frame . contentWindow ;
258
260
unsubscribe ( ) ;
@@ -262,7 +264,7 @@ describe('annotator/frame-observer', () => {
262
264
await waitForEvent ( frame , 'load' ) ;
263
265
clock . tick ( 50 ) ; // Wait for any active polling to trigger
264
266
265
- assert . calledOnce ( callback ) ;
267
+ assert . notCalled ( callback ) ;
266
268
} finally {
267
269
clock . restore ( ) ;
268
270
}
You can’t perform that action at this time.
0 commit comments