jest testcase failing in react

Below code is working properly.

let token:any='';
   token = localStorage.getItem("okta-token-storage"); 
  const bearerToken= "Bearer "+JSON.stringify(token.accessToken.accessToken);
  const handleAction = async () => {
    if (link.current.href) { return }
    const result = await fetch(props.url, { 
      headers: {Authorization: bearerToken}
    })

but when I am testing it in jest it is failing.

below is the value of

okta-token-storage
{"accessToken":{"value":"eyJraWQiOiJFU1JPX21uMG00bEhmOHB2UVU2WUpOS2ZiWktPclp6VVlVZnhTUWRCdXh3IiwiYWxnIjoiUlMyNTYifQ.eyJ2ZXIiOjEsImp0aSI6IkFULkxnMHk5ajNRMWRHU0NlNDFWcHJYdHg4UnJTUWdqTHF0dWVOSWRNTHdBX0UiLCJpc3MiOiJodHRwczovL21hcnNoZGV2LW1tYy5va3RhcHJldmlldy5jb20vb2F1dGgyL2RlZmF1bHQiLCJhdWQiOiJhcGk6Ly9kZWZhdWx0IiwiaWF0IjoxNjUwNDU1NjQ1LCJleHAiOjE2NTA0NTkyNDUsImNpZCI6IjBvYTExYzFnM2cyZXl4dnJRMGg4IiwidWlkIjoiMDB1MTE0bTR1bDlEbW1nUnkwaDgiLCJzY3AiOlsiZW1haWwiLCJvcGVuaWQiLCJwcm9maWxlIl0sImF1dGhfdGltZSI6MTY1MDQzMjQ4Nywic3ViIjoiMTI0NTg2OEBtZ2QubXJzaG1jLmNvbSIsIkVtYWlsIjoiT25rYXIuVGl3YXJpQG1hcnNoLmNvbSJ9.P1XtDPcmynYm0CMBs0M8LBARCydsLVNR8CeAiPdW4i2yy5G_ZE4wUGgE2MTq5GnRaHIxycIEoOe6dYMT0aBNivED3s7yEi0ORCZwWcpbXSzmQ__VTcFt8wCA9UDHKPV-LFcmWEuLcRu5IN2-Eoz0csX8R2gDz0vayK-EPnOOhcyNbaqzhy-kk1a3ELzzZUtgcHX_IBrGCPMg0U4lhpwHOahJK6BeuOPogonqMgNWX3cKhHt37QH-Qk-k7ZmGpt0cLAXjZ_iS2y0LfSNtMyByQHxxUNYHN1JHyL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com/oauth2/default","aud":"api://default","iat":1650455645,"exp":1650459245,"cid":"0oa11c1g3g2eyxvrQ0h8","uid":"00u114m4ul9DmmgRy0h8","scp":["email","openid","profile"],"auth_time":1650432487,"sub":"[email protected]","Email":"[email protected]"},"expiresAt":1650459221,"tokenType":"Bearer","scopes":["email","openid","profile"],"authorizeUrl":"https://infosysdev-infy.oktapreview.com/oauth2/default/v1/authorize","userinfoUrl":"https://infosysdev-infy.oktapreview.com/oauth2/default/v1/userinfo"},"idToken":{"value":"eyJraWQiOiJFU1JPX21uMG00bEhmOHB2UVU2WUpOS2ZiWktPclp6VVlVZnhTUWRCdXh3IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIwMHUxMTRtNHVsOURtbWdSeTBoOCIsIm5hbWUiOiJPbmthciBUaXdhcmkiLCJlbWFpbCI6Ik9ua2FyLlRpd2FyaUBtYXJzaC5jb20iLCJ2ZXIiOjEsImlzcyI6Imh0dHBzOi8vbWFyc2hkZXYtbW1jLm9rdGFwcmV2aWV3LmNvbS9vYXV0aDIvZGVmYXVsdCIsImF1ZCI6IjBvYTExYzFnM2cyZXl4dnJRMGg4IiwiaWF0IjoxNjUwNDU1NjQ2LCJleHAiOjE2NTA0NTkyNDYsImp0aSI6IklELkxxck55NklEb2p0aHVNVGc5NG9TcmM1Y1lLMGFJcDYxOFpBTlpxV3FmTU0iLCJhbXIiOlsicHdkIl0sImlkcCI6IjBvYWwwc3R1bGhsak1Tc0VlMGg3Iiwibm9uY2UiOiJLTlY2MHdMT2tndEw4WXdiblBVVXY2TXhXMjI1dDBnd2ZoZjV0ZHJPZlhBdTJ3V002U1lLcEVmeHRlOXBmOEVrIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiMTI0NTg2OEBtZ2QubXJzaG1jLmNvbSIsImF1dGhfdGltZSI6MTY1MDQzMjQ4NywiYXRfaGFzaCI6IjRxVlRvQ2d1Zkt6QU8xV1BGSU9YWWciLCJsZ24iOiIxMjQ1ODY4QG1nZC5tcnN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TU0iLCJhbXIiOlsicHdkIl0sImlkcCI6IjBvYWwwc3R1bGhsak1Tc0VlMGg3Iiwibm9uY2UiOiJLTlY2MHdMT2tndEw4WXdiblBVVXY2TXhXMjI1dDBnd2ZoZjV0ZHJPZlhBdTJ3V002U1lLcEVmeHRlOXBmOEVrIiwicHJlZmVycmVkX3VzZXJuYW1lIjoiMTI0NTg2OEBtZ2QubXJzaG1jLmNvbSIsImF1dGhfdGltZSI6MTY1MDQzMjQ4NywiYXRfaGFzaCI6IjRxVlRvQ2d1Zkt6QU8xV1BGSU9YWWciLCJsZ24iOiIxMjQ1ODY4QG1nZC5tcnNobWMuY29tIiwiR3JvdXBzIjpbIk1hcnNoX09ubHlfR3JvdXAiLCJFdmVyeW9uZSIsIm1hY3RpX2lwc2VuX2ludGVybmFsIiwibWFjdGlfaXBzZW5fYWRtaW4iLCJhbGxfY29sbGVhZ3VlcyIsIk1hcnNoX1JlYWxlc3RhdGVfSW50ZXJuYWwiXSwibmlkIjoiVTEyNDU4NjgiLCJ0eXAiOiJJbnRlcm5hbCIsImVtcGxveWVlTnVtYmVyIjoiMTI0NTg2OCJ9.FlY2dTau19vO7FqJyTXl12wUSpY4YWQrbJkZSwtvSnb1kww-1ZM6Vho0jc99pRXmU8nfI84W2qYmX7iQOi-75f5rD2nFyFiTGuTKHAS_zKFxGFsbNhia7tEmS0xjHApbzHSK6EQd6GTXbIevoGaX7t-_UHSMoQ2sqtZESzMcUcfjLZV_0ATiQUc6TeEZ2HENQRZjbH2JET8AqTtRodzsfB2iDVGjR6BG4IeXSxACoy5Yp1yE_AAU5NPbD5118PC8IjIdiUELQMaWPAdFlbur0DuWSJk77zfPp2HRuCX4VYRcExAcksygtQnHLFbjfRM8JaMfLbw7L-5iiVf-AAWDXQ","claims":{"sub":"00u114m4ul9DmmgRy0h8","name":"test sharma","email":"[email protected]","ver":1,"iss":"https://infosysdev-infy.oktapreview.com/oauth2/default","aud":"0oa11c1g3g2eyxvrQ0h8","iat":1650455646,"exp":1650459246,"jti":"ID.LqrNy6IDojthuMTg94oSrc5cYK0aIp618ZANZqWqfMM","amr":["pwd"],"idp":"0oal0stulhljMSsEe0h7","nonce":"KNV60wLOkgtL8YwbnPUUv6MxW225t0gwfhf5tdrOfXAu2wWM6SYKpEfxte9pf8Ek","preferred_username":"[email protected]","auth_time":1650432487,"at_hash":"4qVToCgufKzAO1WPFIOXYg","lgn":"[email protected]","Groups":["infosys_Only_Group","Everyone","macti_ipsen_internal","macti_ipsen_admin","all_colleagues","infosys_Realestate_Internal"],"nid":"U1245868","typ":"Internal","employeeNumber":"1245868"},"expiresAt":1650459246,"scopes":["openid","profile","email"],"authorizeUrl":"https://infosysdev-infy.oktapreview.com/oauth2/default/v1/authorize","issuer":"https://infosysdev-infy.oktapreview.com/oauth2/default","clientId":"0oa11c1g3g2eyxvrQ0h8"}}

enter image description here

what mistake I am doing?