@samitouri / QOS-React / commits / 2a9fab001a

[be] Fix test

'e' does not exist, use 'd' instead

Sathya Gunasekaran committed Feb 10, 2023 at 17:26 UTC 2a9fab001a9af34848ebc7d98f5351a6d673cb62
2 files changed +15 -12
compiler/forget/src/__tests__/fixtures/hir/destructuring-assignment.expect.md
+14 -11
@@ -18,7 +18,7 @@ function foo(a, b, c) {
18 },
19 o,
20 } = b);
21 - return { e, g, n, o };
21 + return { d, g, n, o };
22 }
23
24 ```
@@ -29,22 +29,25 @@ function foo(a, b, c) {
29 function foo(a, b, c) {
30 const $ = React.unstable_useMemoCache();
31
32 + const d = a[0];
33 const g = a[1][0].e.f;
34
35 const n = b.l.m[0][0];
36 const o = b.o;
36 - const c_0 = $[0] !== g;
37 - const c_1 = $[1] !== n;
38 - const c_2 = $[2] !== o;
37 + const c_0 = $[0] !== d;
38 + const c_1 = $[1] !== g;
39 + const c_2 = $[2] !== n;
40 + const c_3 = $[3] !== o;
41 let t0;
40 - if (c_0 || c_1 || c_2) {
41 - t0 = { e: e, g: g, n: n, o: o };
42 - $[0] = g;
43 - $[1] = n;
44 - $[2] = o;
45 - $[3] = t0;
42 + if (c_0 || c_1 || c_2 || c_3) {
43 + t0 = { d: d, g: g, n: n, o: o };
44 + $[0] = d;
45 + $[1] = g;
46 + $[2] = n;
47 + $[3] = o;
48 + $[4] = t0;
49 } else {
47 - t0 = $[3];
50 + t0 = $[4];
51 }
52 return t0;
53 }
compiler/forget/src/__tests__/fixtures/hir/destructuring-assignment.js
+1 -1
@@ -14,5 +14,5 @@ function foo(a, b, c) {
14 },
15 o,
16 } = b);
17 - return { e, g, n, o };
17 + return { d, g, n, o };
18 }