From 796be7ec5b3972470e8213db67b21879f4055204 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Mon, 22 Feb 2021 18:30:25 -0800 Subject: [PATCH] fix(gatsby): Fix snapshot for integration-tests/ssr tests --- .../ssr/__tests__/__snapshots__/ssr.js.snap | 14 +++++++------- integration-tests/ssr/gatsby-config.js | 3 +++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/integration-tests/ssr/__tests__/__snapshots__/ssr.js.snap b/integration-tests/ssr/__tests__/__snapshots__/ssr.js.snap index fb84baa33e754..7590380369c25 100644 --- a/integration-tests/ssr/__tests__/__snapshots__/ssr.js.snap +++ b/integration-tests/ssr/__tests__/__snapshots__/ssr.js.snap @@ -105,13 +105,13 @@ exports[`SSR it generates an error page correctly 1`] = `

error

window is not defined -
  2 | 
-  3 | const Component = () => {
-> 4 |   const a = window.width
-    |             ^
-  5 | 
-  6 |   return <div>hi</div>
-  7 | }
+
  2 |
+  3 | const Component = () => {
+> 4 |   const a = window.width
+    |             ^
+  5 |
+  6 |   return <div>hi</div>
+  7 | }

For help debugging SSR errors, see this docs page: https://www.gatsbyjs.com/docs/debugging-html-builds/

Skip SSR

diff --git a/integration-tests/ssr/gatsby-config.js b/integration-tests/ssr/gatsby-config.js index 7227b35bf4e61..ff847afe83aba 100644 --- a/integration-tests/ssr/gatsby-config.js +++ b/integration-tests/ssr/gatsby-config.js @@ -1,4 +1,7 @@ module.exports = { + flags: { + DEV_SSR: true, + }, siteMetadata: { title: `Hello world`, author: `Sid Chatterjee`,