@samitouri / QOS-React-2 / commits / 9d6170ab98

Update snap fixture

Missed this in my last PR

Lauren Tan committed Sep 5, 2023 at 15:07 UTC 9d6170ab98cdd811ccc7cdf1b53d8520aa7f5c15
2 files changed +5 -11
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-mutate.expect.md
+4 -8
@@ -2,15 +2,13 @@
2 ## Input
3
4 ```javascript
5 -import { makeObject_Primitives, mutateObject, Stringify } from "shared-runtime";
5 +import { makeObject_Primitives, mutate, Stringify } from "shared-runtime";
6
7 function Component(_props) {
8 const collection = [makeObject_Primitives()];
9 const results = [];
10 for (const item of collection) {
11 - results.push(
12 - <div key={Stringify(item)}>{Stringify(mutateObject(item))}</div>
13 - );
11 + results.push(<div key={Stringify(item)}>{Stringify(mutate(item))}</div>);
12 }
13 return <div>{results}</div>;
14 }
@@ -27,7 +25,7 @@ export const FIXTURE_ENTRYPOINT = {
25
26 ```javascript
27 import { unstable_useMemoCache as useMemoCache } from "react";
30 -import { makeObject_Primitives, mutateObject, Stringify } from "shared-runtime";
28 +import { makeObject_Primitives, mutate, Stringify } from "shared-runtime";
29
30 function Component(_props) {
31 const $ = useMemoCache(2);
@@ -36,9 +34,7 @@ function Component(_props) {
34 const collection = [makeObject_Primitives()];
35 results = [];
36 for (const item of collection) {
39 - results.push(
40 - <div key={Stringify(item)}>{Stringify(mutateObject(item))}</div>
41 - );
37 + results.push(<div key={Stringify(item)}>{Stringify(mutate(item))}</div>);
38 }
39 $[0] = results;
40 } else {
compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/for-of-mutate.tsx
+1 -3
@@ -4,9 +4,7 @@ function Component(_props) {
4 const collection = [makeObject_Primitives()];
5 const results = [];
6 for (const item of collection) {
7 - results.push(
8 - <div key={Stringify(item)}>{Stringify(mutate(item))}</div>
9 - );
7 + results.push(<div key={Stringify(item)}>{Stringify(mutate(item))}</div>);
8 }
9 return <div>{results}</div>;
10 }