diff --git a/src/components/AppBarScoreBadge.test.tsx b/src/components/AppBarScoreBadge.test.tsx index daca7a0..dd55067 100644 --- a/src/components/AppBarScoreBadge.test.tsx +++ b/src/components/AppBarScoreBadge.test.tsx @@ -124,7 +124,10 @@ describe('AppBarScoreBadge', () => { }); it('navigates to /polaris when no cluster in URL', async () => { - window.location = { pathname: '/settings' } as Location; + Object.defineProperty(window, 'location', { + value: { pathname: '/settings' }, + writable: true, + }); const user = userEvent.setup(); const data = makeAuditData([ makeResult({