Unverified Commit 934e5a48 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update usage of example.com -> example.vercel.sh (#37630)

* Update usage of example.com -> example.vercel.sh

* another one

* another flakey test
parent 9f0e691a
...@@ -38,7 +38,7 @@ describe('basePath', () => { ...@@ -38,7 +38,7 @@ describe('basePath', () => {
}, },
{ {
source: '/rewrite-no-basepath', source: '/rewrite-no-basepath',
destination: 'https://example.com', destination: 'https://example.vercel.sh',
basePath: false, basePath: false,
}, },
{ {
...@@ -757,7 +757,9 @@ describe('basePath', () => { ...@@ -757,7 +757,9 @@ describe('basePath', () => {
.waitForElementByCss('#other-page-title') .waitForElementByCss('#other-page-title')
const eventLog = await browser.eval('window._getEventLog()') const eventLog = await browser.eval('window._getEventLog()')
expect(eventLog).toEqual([ expect(
eventLog.filter((item) => item[1]?.endsWith('/other-page'))
).toEqual([
['routeChangeStart', `${basePath}/other-page`, { shallow: false }], ['routeChangeStart', `${basePath}/other-page`, { shallow: false }],
['beforeHistoryChange', `${basePath}/other-page`, { shallow: false }], ['beforeHistoryChange', `${basePath}/other-page`, { shallow: false }],
['routeChangeComplete', `${basePath}/other-page`, { shallow: false }], ['routeChangeComplete', `${basePath}/other-page`, { shallow: false }],
......
...@@ -131,7 +131,7 @@ export async function middleware(request) { ...@@ -131,7 +131,7 @@ export async function middleware(request) {
const response = {} const response = {}
try { try {
await fetch('https://example.com', { signal }) await fetch('https://example.vercel.sh', { signal })
} catch (err) { } catch (err) {
response.error = { response.error = {
name: err.name, name: err.name,
......
...@@ -4,6 +4,6 @@ export default async (req, res) => { ...@@ -4,6 +4,6 @@ export default async (req, res) => {
url: req.url, url: req.url,
query: req.query, query: req.query,
// make sure fetch if polyfilled // make sure fetch if polyfilled
example: await fetch('https://example.com').then((res) => res.text()), example: await fetch('https://example.vercel.sh').then((res) => res.text()),
}) })
} }
...@@ -12,7 +12,7 @@ export const getStaticProps = ({ params }) => { ...@@ -12,7 +12,7 @@ export const getStaticProps = ({ params }) => {
export const getStaticPaths = async () => { export const getStaticPaths = async () => {
// make sure fetch if polyfilled // make sure fetch if polyfilled
await fetch('https://example.com').then((res) => res.text()) await fetch('https://example.vercel.sh').then((res) => res.text())
return { return {
paths: ['/fallback/first'], paths: ['/fallback/first'],
......
...@@ -24,7 +24,9 @@ export async function getServerSideProps({ res }) { ...@@ -24,7 +24,9 @@ export async function getServerSideProps({ res }) {
data, data,
random: Math.random(), random: Math.random(),
// make sure fetch if polyfilled // make sure fetch if polyfilled
example: await fetch('https://example.com').then((res) => res.text()), example: await fetch('https://example.vercel.sh').then((res) =>
res.text()
),
}, },
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment