Skip to content

Commit 4efdd75

Browse files
Copilotfregante
andcommitted
Fix test cleanup in wait test to handle undefined descriptor
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
1 parent 95239d0 commit 4efdd75

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

index.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,5 +333,8 @@ test('wait - false when document complete', async () => {
333333
// Restore original state
334334
if (originalReadyState) {
335335
Object.defineProperty(document, 'readyState', originalReadyState);
336+
} else {
337+
// If readyState wasn't a property before, delete it
338+
delete (document as any).readyState;
336339
}
337340
});

0 commit comments

Comments
 (0)