rsnext/test/integration/client-navigation/pages/nav/as-path-query.js
JJ Kasper 7d0919a784 Break up basic test suite (#6730)
* Break out client-navigation and rendering
test from basic test

* Try with parallelism dialed back to 3

* Update jest-junit for more compatible timings in CircleCI

* Bump to test timings

* Use filepath for suitename in jest-junit

* Store reports as artifacts

* Try using classname for timings

* Bump

* Remove reports from artifacts
2019-03-20 11:01:32 +01:00

21 lines
636 B
JavaScript

import Link from 'next/link'
import { withRouter } from 'next/router'
export default withRouter(({ router: { asPath, query } }) => {
return <div
id={asPath
.replace('/', '').replace('/', '-').replace('?', '-').replace('=', '-')
}>
<div id='router-query'>{JSON.stringify(query)}</div>
<div>
<Link href='/nav/as-path-query?something=hello' as='/something/hello?something=hello'>
<a id='hello'>hello</a>
</Link>
</div>
<div>
<Link href='/nav/as-path-query?something=else' as='/something/hello?something=else'>
<a id='hello2'>hello</a>
</Link>
</div>
</div>
})