Commit a40a32d1 authored by JJ Kasper's avatar JJ Kasper Committed by Joe Haddad

Fix SSG tests failing on windows (#9710)

parent c4c31732
...@@ -37,7 +37,7 @@ export const calculateRevalidate = (pathname: string): number | false => { ...@@ -37,7 +37,7 @@ export const calculateRevalidate = (pathname: string): number | false => {
// in development we don't have a prerender-manifest // in development we don't have a prerender-manifest
// and default to always revalidating to allow easier debugging // and default to always revalidating to allow easier debugging
const curTime = new Date().getTime() const curTime = new Date().getTime()
if (sprOptions.dev) return curTime if (sprOptions.dev) return curTime - 1000
const { initialRevalidateSeconds } = prerenderManifest.routes[pathname] || { const { initialRevalidateSeconds } = prerenderManifest.routes[pathname] || {
initialRevalidateSeconds: 1, initialRevalidateSeconds: 1,
......
...@@ -105,6 +105,17 @@ const expectedManifestRoutes = () => ({ ...@@ -105,6 +105,17 @@ const expectedManifestRoutes = () => ({
const navigateTest = () => { const navigateTest = () => {
it('should navigate between pages successfully', async () => { it('should navigate between pages successfully', async () => {
const toBuild = [
'/',
'/another',
'/something',
'/normal',
'/blog/post-1',
'/blog/post-1/comment-1',
]
await Promise.all(toBuild.map(pg => renderViaHTTP(appPort, pg)))
const browser = await webdriver(appPort, '/') const browser = await webdriver(appPort, '/')
let text = await browser.elementByCss('p').text() let text = await browser.elementByCss('p').text()
expect(text).toMatch(/hello.*?world/) expect(text).toMatch(/hello.*?world/)
......
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