Skip to content

Commit

Permalink
Move hydration mis-match test suite (#21264)
Browse files Browse the repository at this point in the history
In this [PR](#21065), it was suggested to move the test suite, but it was merged before fixing.
This is the fix for that, moving link-with-hash test suite to client-navigation suite

detail: https://github.com/vercel/next.js/pull/21065/files#r558425551
  • Loading branch information
kaykdm committed Jan 18, 2021
1 parent f534a5c commit 699a7ae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 67 deletions.
15 changes: 15 additions & 0 deletions test/integration/client-navigation/test/index.test.js
Expand Up @@ -550,6 +550,21 @@ describe('Client Navigation', () => {
})

describe('with hash changes', () => {
describe('check hydration mis-match', () => {
it('should not have hydration mis-match for hash link', async () => {
const browser = await webdriver(context.appPort, '/nav/hash-changes')
const browserLogs = await browser.log('browser')
let found = false
browserLogs.forEach((log) => {
console.log('log.message', log.message)
if (log.message.includes('Warning: Prop')) {
found = true
}
})
expect(found).toEqual(false)
})
})

describe('when hash change via Link', () => {
it('should not run getInitialProps', async () => {
const browser = await webdriver(context.appPort, '/nav/hash-changes')
Expand Down
14 changes: 0 additions & 14 deletions test/integration/link-with-hash/pages/index.js

This file was deleted.

53 changes: 0 additions & 53 deletions test/integration/link-with-hash/test/index.test.js

This file was deleted.

0 comments on commit 699a7ae

Please sign in to comment.