Skip to content

Commit

Permalink
use example.com
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Sep 17, 2021
1 parent 432d146 commit 607227e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/dev/basic.ssr.test.js
Expand Up @@ -182,14 +182,14 @@ describe('basic ssr', () => {
test('/redirect -> external link', async () => {
const { html } = await nuxt.server.renderRoute('/redirect-external', renderContext)
expect(_status).toBe(302)
expect(_headers.Location).toBe('https://nuxtjs.org/docs/features/data-fetching/')
expect(_headers.Location).toBe('https://example.com/test/')
expect(html).toContain('<div data-server-rendered="true" id="__nuxt"></div>')
})

test('/redirect -> external link without trailing slash', async () => {
const { html } = await nuxt.server.renderRoute('/redirect-external-no-slash', renderContext)
expect(_status).toBe(302)
expect(_headers.Location).toBe('https://nuxtjs.org/docs/features/data-fetching/')
expect(_headers.Location).toBe('https://example.com/test')
expect(html).toContain('<div data-server-rendered="true" id="__nuxt"></div>')
})

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/basic.browser.test.js
Expand Up @@ -262,7 +262,7 @@ describe('basic browser', () => {
await page.nuxt.navigate('/redirect-external', false)

await page.waitForFunction(
() => window.location.href === 'https://nuxtjs.org/docs/features/data-fetching/'
() => window.location.href === 'https://example.com/test/'
)
page.close()
})
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/basic/pages/redirect-external-no-slash.vue
Expand Up @@ -5,7 +5,7 @@
<script>
export default {
middleware ({ redirect }) {
return redirect('https://nuxtjs.org/docs/features/data-fetching/')
return redirect('https://example.com/test')
}
}
</script>
2 changes: 1 addition & 1 deletion test/fixtures/basic/pages/redirect-external.vue
Expand Up @@ -5,7 +5,7 @@
<script>
export default {
middleware ({ redirect }) {
return redirect('https://nuxtjs.org/docs/features/data-fetching/')
return redirect('https://example.com/test/')
}
}
</script>

0 comments on commit 607227e

Please sign in to comment.