MCPcopy
hub / github.com/TanStack/router / checkPostsLink

Function checkPostsLink

packages/solid-router/tests/link.test.tsx:5623–5631  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

5621 expect(searchValue).toHaveTextContent(value)
5622 }
5623 async function checkPostsLink(root: string) {
5624 const postsLink = await screen.findByRole('link', { name: 'Posts' })
5625 expect(postsLink).toHaveAttribute('href')
5626 const href = postsLink.getAttribute('href')
5627 const search = getSearchParamsFromURI(href!)
5628 expect(search.size).toBe(2)
5629 expect(search.get('page')).toBe('123')
5630 expect(search.get('root')).toBe(root)
5631 }
5632 await checkSearchValue('abc')
5633 await checkPostsLink('abc')
5634

Callers 1

link.test.tsxFile · 0.70

Calls 3

getSearchParamsFromURIFunction · 0.90
getAttributeMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected