You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<Linkhref={href??''}target="_blank"className={className}{...props}>
link
</Link></TooltipTrigger>
test('should open in spotify',async()=>{render(<OpenInSpotifyButtonhref={href}/>,{wrapper: MemoryRouterProvider,})constuser=userEvent.setup()awaituser.click(screen.getByRole('link'))expect(mockRouter.pathname).toEqual(href)})
AssertionError: expected '/' to deeply equal 'https://spotify.com'
- Expected
+ Received
- https://spotify.com
+ /
The text was updated successfully, but these errors were encountered:
In this case it's probably best to assert the attributes on the link. Since the target is _blank it won't actually set the url of the current page, but open an entirely different one.
The text was updated successfully, but these errors were encountered: