Skip to content

Commit

Permalink
Add param test
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Jan 27, 2020
1 parent 2e8ef84 commit 4fe847a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/integration/getserverprops/test/index.test.js
Expand Up @@ -249,6 +249,16 @@ const runTests = (dev = false) => {
expect(text).toMatch(/a normal page/)
})

it('should provide correct query value for dynamic page', async () => {
const html = await renderViaHTTP(
appPort,
'/blog/post-1?post=something-else'
)
const $ = cheerio.load(html)
const query = JSON.parse($('#query').text())
expect(query.post).toBe('post-1')
})

it('should parse query values on mount correctly', async () => {
const browser = await webdriver(appPort, '/blog/post-1?another=value')
await waitFor(2000)
Expand Down

0 comments on commit 4fe847a

Please sign in to comment.