From c25106bf212974bbfafafabbc650e368576f07d0 Mon Sep 17 00:00:00 2001 From: Paul Hachmang Date: Wed, 20 May 2026 16:21:21 +0200 Subject: [PATCH] test(next-config): regenerate mergeEnvIntoConfig snapshot The `parses an env config object` test feeds the env-schema parser `GC_DEMO_MODE='1'`, `GC_STOREFRONT_0_HYGRAPH_LOCALES_0='en'`, and `GC_STOREFRONT_1_HYGRAPH_LOCALES_0='de'`, but the committed snapshot still reflects the pre-`demoMode` / pre-flattened-`hygraphLocales` schema. Every CI run since those config fields were added (and the test input updated) has failed the `test` job on every PR with a snapshot mismatch unrelated to the PR's own changes: Snapshot \`parses an env config object 1\` mismatched + "GC_DEMO_MODE": true, + "GC_STOREFRONT_0_HYGRAPH_LOCALES_0": "en", + "GC_STOREFRONT_1_HYGRAPH_LOCALES_0": "de", Update the snapshot to match the schema. No code change. --- .changeset/fix-merge-env-snapshot.md | 11 +++++++++++ .../utils/__snapshots__/mergeEnvIntoConfig.ts.snap | 3 +++ 2 files changed, 14 insertions(+) create mode 100644 .changeset/fix-merge-env-snapshot.md diff --git a/.changeset/fix-merge-env-snapshot.md b/.changeset/fix-merge-env-snapshot.md new file mode 100644 index 0000000000..cfc744be78 --- /dev/null +++ b/.changeset/fix-merge-env-snapshot.md @@ -0,0 +1,11 @@ +--- +'@graphcommerce/next-config': patch +--- + +Regenerate the `mergeEnvIntoConfig` snapshot so `yarn test` passes on +canary. The test input already feeds `GC_DEMO_MODE` and +`GC_STOREFRONT__HYGRAPH_LOCALES_0` into the env-schema parser, but +the snapshot it was compared against still reflected the pre-`demoMode` +/ pre-flattened-`hygraphLocales` schema, so every CI run since those +config fields were added has been failing the `test` job on every PR +with a snapshot mismatch unrelated to the PR's own changes. diff --git a/packagesDev/next-config/__tests__/config/utils/__snapshots__/mergeEnvIntoConfig.ts.snap b/packagesDev/next-config/__tests__/config/utils/__snapshots__/mergeEnvIntoConfig.ts.snap index e874d7e6d2..b4068473f4 100644 --- a/packagesDev/next-config/__tests__/config/utils/__snapshots__/mergeEnvIntoConfig.ts.snap +++ b/packagesDev/next-config/__tests__/config/utils/__snapshots__/mergeEnvIntoConfig.ts.snap @@ -2,6 +2,7 @@ exports[`parses an env config object 1`] = ` { + "GC_DEMO_MODE": true, "GC_STOREFRONT": [ { "defaultLocale": true, @@ -13,8 +14,10 @@ exports[`parses an env config object 1`] = ` }, ], "GC_STOREFRONT_0_DEFAULT_LOCALE": true, + "GC_STOREFRONT_0_HYGRAPH_LOCALES_0": "en", "GC_STOREFRONT_0_LOCALE": "en", "GC_STOREFRONT_0_MAGENTO_STORE_CODE": "en_us", + "GC_STOREFRONT_1_HYGRAPH_LOCALES_0": "de", "GC_STOREFRONT_1_LOCALE": "de", "GC_STOREFRONT_1_MAGENTO_STORE_CODE": "de_de", }