Repository: facebook/react
Pull request: [DevTools] Use Inline Snapshots for `storeStressTestSync`

Change `storeStressTestSync` to use inline snapshots instead of a snapshot file.  We want to do this because some tests are gated and not called in regression tests, and if snapshot tests are not called when there is a corresponding `.snap` file, that test will fail.

Arguably inline snapshots are a better pattern anyway, so enforcing this in DevTools tests IMO makes sense

Changed files:
filename: packages/react-devtools-shared/src/__tests__/__snapshots__/storeStressSync-test.js.snap
patch: @@ -1,493 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 1`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 2`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 3`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <A key="a">
-        <B key="b">
-        <C key="c">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 4`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <C key="c">
-        <B key="b">
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 5`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <C key="c">
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 6`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <C key="c">
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 7`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <C key="c">
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 8`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <A key="a">
-        <B key="b">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 9`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 10`] = `
-[root]
-  ▾ <Root>
-      <X>
-      <Suspense>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 11`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <B key="b">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense (Legacy Mode) 12`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 1`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-      ▾ <MaybeSuspend>
-          <A key="a">
-          <Z>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 2`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-      ▾ <MaybeSuspend>
-          <A key="a">
-          <Z>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 3`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-      ▾ <MaybeSuspend>
-          <A key="a">
-          <B key="b">
-          <C key="c">
-          <Z>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 4`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-      ▾ <MaybeSuspend>
-          <C key="c">
-          <B key="b">
-          <A key="a">
-          <Z>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 5`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-      ▾ <MaybeSuspend>
-          <C key="c">
-          <A key="a">
-          <Z>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 6`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-      ▾ <MaybeSuspend>
-          <C key="c">
-          <A key="a">
-          <Z>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 7`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-      ▾ <MaybeSuspend>
-          <C key="c">
-          <A key="a">
-          <Z>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 8`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-      ▾ <MaybeSuspend>
-          <A key="a">
-          <B key="b">
-          <Z>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 9`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-      ▾ <MaybeSuspend>
-          <A key="a">
-          <Z>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 10`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-      ▾ <MaybeSuspend>
-          <Z>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 11`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-      ▾ <MaybeSuspend>
-          <B key="b">
-          <Z>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 12`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-      ▾ <MaybeSuspend>
-          <A key="a">
-          <Z>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 13`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 14`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 15`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <A key="a">
-        <B key="b">
-        <C key="c">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 16`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <C key="c">
-        <B key="b">
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 17`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <C key="c">
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 18`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <C key="c">
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 19`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <C key="c">
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 20`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <A key="a">
-        <B key="b">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 21`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 22`] = `
-[root]
-  ▾ <Root>
-      <X>
-      <Suspense>
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 23`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <B key="b">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test for Suspense without type change (Legacy Mode) 24`] = `
-[root]
-  ▾ <Root>
-      <X>
-    ▾ <Suspense>
-        <A key="a">
-      <Y>
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test with different tree operations (Legacy Mode): 1: abcde 1`] = `
-[root]
-  ▾ <Parent>
-      <A key="a">
-      <B key="b">
-      <C key="c">
-      <D key="d">
-      <E key="e">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle a stress test with different tree operations (Legacy Mode): 2: abxde 1`] = `
-[root]
-  ▾ <Parent>
-      <A key="a">
-      <B key="b">
-    ▾ <C key="c">
-        <X>
-      <D key="d">
-      <E key="e">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 1`] = `
-[root]
-  ▾ <Root>
-      <A key="a">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 2`] = `
-[root]
-  ▾ <Root>
-      <B key="b">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 3`] = `
-[root]
-  ▾ <Root>
-      <C key="c">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 4`] = `
-[root]
-  ▾ <Root>
-      <D key="d">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 5`] = `
-[root]
-  ▾ <Root>
-      <E key="e">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 6`] = `
-[root]
-  ▾ <Root>
-      <A key="a">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 7`] = `
-[root]
-  ▾ <Root>
-      <B key="b">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 8`] = `
-[root]
-  ▾ <Root>
-      <C key="c">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 9`] = `
-[root]
-  ▾ <Root>
-      <D key="d">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 10`] = `
-[root]
-  ▾ <Root>
-      <E key="e">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 11`] = `
-[root]
-  ▾ <Root>
-      <A key="a">
-      <B key="b">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 12`] = `
-[root]
-  ▾ <Root>
-      <B key="b">
-      <A key="a">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 13`] = `
-[root]
-  ▾ <Root>
-      <B key="b">
-      <C key="c">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 14`] = `
-[root]
-  ▾ <Root>
-      <C key="c">
-      <B key="b">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 15`] = `
-[root]
-  ▾ <Root>
-      <A key="a">
-      <C key="c">
-`;
-
-exports[`StoreStress (Legacy Mode) should handle stress test with reordering (Legacy Mode) 16`] = `
-[root]
-  ▾ <Root>
-      <C key="c">
-      <A key="a">
-`;

filename: packages/react-devtools-shared/src/__tests__/storeStressSync-test.js
patch: @@ -62,7 +62,15 @@ describe('StoreStress (Legacy Mode)', () => {
     // 1. Render a normal version of [a, b, c, d, e].
     let container = document.createElement('div');
     act(() => legacyRender(<Parent>{[a, b, c, d, e]}</Parent>, container));
-    expect(store).toMatchSnapshot('1: abcde');
+    expect(store).toMatchInlineSnapshot(`
+      [root]
+        ▾ <Parent>
+            <A key="a">
+            <B key="b">
+            <C key="c">
+            <D key="d">
+            <E key="e">
+    `);
     expect(container.textContent).toMatch('abcde');
     const snapshotForABCDE = print(store);
 
@@ -71,7 +79,16 @@ describe('StoreStress (Legacy Mode)', () => {
     act(() => {
       setShowX(true);
     });
-    expect(store).toMatchSnapshot('2: abxde');
+    expect(store).toMatchInlineSnapshot(`
+      [root]
+        ▾ <Parent>
+            <A key="a">
+            <B key="b">
+          ▾ <C key="c">
+              <X>
+            <D key="d">
+            <E key="e">
+    `);
     expect(container.textContent).toMatch('abxde');
     const snapshotForABXDE = print(store);
 
@@ -208,6 +225,95 @@ describe('StoreStress (Legacy Mode)', () => {
       [c, a],
     ];
 
+    const stepsSnapshot = [
+      `
+      [root]
+        ▾ <Root>
+            <A key="a">
+    `,
+      `
+      [root]
+        ▾ <Root>
+            <B key="b">
+    `,
+      `
+      [root]
+        ▾ <Root>
+            <C key="c">
+    `,
+      `
+      [root]
+        ▾ <Root>
+            <D key="d">
+      `,
+      `
+      [root]
+        ▾ <Root>
+            <E key="e">
+      `,
+      `
+      [root]
+        ▾ <Root>
+            <A key="a">
+      `,
+      `
+      [root]
+        ▾ <Root>
+            <B key="b">
+      `,
+      `
+      [root]
+        ▾ <Root>
+            <C key="c">
+      `,
+      `
+      [root]
+        ▾ <Root>
+            <D key="d">
+      `,
+      `
+      [root]
+        ▾ <Root>
+            <E key="e">
+      `,
+      `
+      [root]
+        ▾ <Root>
+            <A key="a">
+            <B key="b">
+      `,
+      `
+      [root]
+        ▾ <Root>
+            <B key="b">
+            <A key="a">
+      `,
+      `
+      [root]
+        ▾ <Root>
+            <B key="b">
+            <C key="c">
+      `,
+      `
+      [root]
+        ▾ <Root>
+            <C key="c">
+            <B key="b">
+      `,
+      `
+      [root]
+        ▾ <Root>
+            <A key="a">
+            <C key="c">
+      `,
+      `
+      [root]
+        ▾ <Root>
+            <C key="c">
+            <A key="a">
+      `,
+    ];
+
     const Root = ({children}) => {
       return children;
     };
@@ -218,7 +324,7 @@ describe('StoreStress (Legacy Mode)', () => {
     for (let i = 0; i < steps.length; i++) {
       act(() => legacyRender(<Root>{steps[i]}</Root>, container));
       // We snapshot each step once so it doesn't regress.
-      expect(store).toMatchSnapshot();
+      expect(store).toMatchInlineSnapshot(stepsSnapshot[i]);
       snapshots.push(print(store));
       act(() => ReactDOM.unmountComponentAtNode(container));
       expect(print(store)).toBe('');
@@ -305,6 +411,112 @@ describe('StoreStress (Legacy Mode)', () => {
       a,
     ];
 
+    const stepsSnapshot = [
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <A key="a">
+                <B key="b">
+                <C key="c">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <C key="c">
+                <B key="b">
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <C key="c">
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <C key="c">
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <C key="c">
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <A key="a">
+                <B key="b">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+              <Suspense>
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <B key="b">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <A key="a">
+              <Y>
+      `,
+    ];
+
     const Never = () => {
       throw new Promise(() => {});
     };
@@ -329,7 +541,7 @@ describe('StoreStress (Legacy Mode)', () => {
         ),
       );
       // We snapshot each step once so it doesn't regress.
-      expect(store).toMatchSnapshot();
+      expect(store).toMatchInlineSnapshot(stepsSnapshot[i]);
       snapshots.push(print(store));
       act(() => ReactDOM.unmountComponentAtNode(container));
       expect(print(store)).toBe('');
@@ -699,6 +911,242 @@ describe('StoreStress (Legacy Mode)', () => {
       a,
     ];
 
+    const stepsSnapshot = [
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+              ▾ <MaybeSuspend>
+                  <A key="a">
+                  <Z>
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+              ▾ <MaybeSuspend>
+                  <A key="a">
+                  <Z>
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+              ▾ <MaybeSuspend>
+                  <A key="a">
+                  <B key="b">
+                  <C key="c">
+                  <Z>
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+              ▾ <MaybeSuspend>
+                  <C key="c">
+                  <B key="b">
+                  <A key="a">
+                  <Z>
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+              ▾ <MaybeSuspend>
+                  <C key="c">
+                  <A key="a">
+                  <Z>
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+              ▾ <MaybeSuspend>
+                  <C key="c">
+                  <A key="a">
+                  <Z>
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+              ▾ <MaybeSuspend>
+                  <C key="c">
+                  <A key="a">
+                  <Z>
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+              ▾ <MaybeSuspend>
+                  <A key="a">
+                  <B key="b">
+                  <Z>
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+              ▾ <MaybeSuspend>
+                  <A key="a">
+                  <Z>
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+              ▾ <MaybeSuspend>
+                  <Z>
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+              ▾ <MaybeSuspend>
+                  <B key="b">
+                  <Z>
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+              ▾ <MaybeSuspend>
+                  <A key="a">
+                  <Z>
+              <Y>
+      `,
+    ];
+
+    const stepsSnapshotTwo = [
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <A key="a">
+                <B key="b">
+                <C key="c">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <C key="c">
+                <B key="b">
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <C key="c">
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <C key="c">
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <C key="c">
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <A key="a">
+                <B key="b">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <A key="a">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+              <Suspense>
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <B key="b">
+              <Y>
+      `,
+      `
+        [root]
+          ▾ <Root>
+              <X>
+            ▾ <Suspense>
+                <A key="a">
+              <Y>
+      `,
+    ];
+
     const Never = () => {
       throw new Promise(() => {});
     };
@@ -743,7 +1191,7 @@ describe('StoreStress (Legacy Mode)', () => {
         ),
       );
       // We snapshot each step once so it doesn't regress.
-      expect(store).toMatchSnapshot();
+      expect(store).toMatchInlineSnapshot(stepsSnapshot[i]);
       snapshots.push(print(store));
       act(() => ReactDOM.unmountComponentAtNode(container));
       expect(print(store)).toBe('');
@@ -769,7 +1217,7 @@ describe('StoreStress (Legacy Mode)', () => {
         ),
       );
       // We snapshot each step once so it doesn't regress.
-      expect(store).toMatchSnapshot();
+      expect(store).toMatchInlineSnapshot(stepsSnapshotTwo[i]);
       fallbackSnapshots.push(print(store));
       act(() => ReactDOM.unmountComponentAtNode(container));
       expect(print(store)).toBe('');