Skip to content

Commit

Permalink
fix: unit test windows delete
Browse files Browse the repository at this point in the history
  • Loading branch information
mauroreisvieira committed Jan 16, 2025
1 parent 772978c commit ef5dc04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/utilities/__tests__/unit/platform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ function mockNavigator(userAgent: string) {
});
}

// Restore global `window` to its original state
// Simulate a non-browser environment
function restoreWindow() {
global.window = window; // Reassign it to the default window object
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(global as any).window = undefined; // Set `window` to `undefined`
}

// Helper to restore the default navigator
Expand Down

0 comments on commit ef5dc04

Please sign in to comment.