Skip to content

Commit 5822aed

Browse files
hi-ogawacodex
andcommitted
test(rsc): refine hoist fixture names
Co-authored-by: Codex <noreply@openai.com>
1 parent c605a83 commit 5822aed

6 files changed

Lines changed: 28 additions & 0 deletions

packages/plugin-rsc/src/transforms/fixtures/hoist/assignment-to-captured-local.js renamed to packages/plugin-rsc/src/transforms/fixtures/hoist/captured-local-assignment.js

File renamed without changes.

packages/plugin-rsc/src/transforms/fixtures/hoist/assignment-to-captured-local.js.snap.js renamed to packages/plugin-rsc/src/transforms/fixtures/hoist/captured-local-assignment.js.snap.js

File renamed without changes.

packages/plugin-rsc/src/transforms/fixtures/hoist/increment-captured-local.js renamed to packages/plugin-rsc/src/transforms/fixtures/hoist/captured-local-increment.js

File renamed without changes.

packages/plugin-rsc/src/transforms/fixtures/hoist/increment-captured-local.js.snap.js renamed to packages/plugin-rsc/src/transforms/fixtures/hoist/captured-local-increment.js.snap.js

File renamed without changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// TODO: follow up if this edge case matters.
2+
// The current transform self-binds `action`, which is suspicious enough to
3+
// keep as an intentionally verified TODO fixture for now.
4+
function outer() {
5+
const action = /* #__PURE__ */ $$register($$hoist_0_action, "<id>", "$$hoist_0_action").bind(null, action);
6+
}
7+
8+
;export async function $$hoist_0_action(action) {
9+
'use server'
10+
if (false) {
11+
return action()
12+
}
13+
return 0
14+
};
15+
/* #__PURE__ */ Object.defineProperty($$hoist_0_action, "name", { value: "action" });
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function outer() {
2+
const value = 0
3+
const action = /* #__PURE__ */ $$register($$hoist_0_action, "<id>", "$$hoist_0_action").bind(null, value);
4+
}
5+
6+
;export async function $$hoist_0_action(value) {
7+
'use server'
8+
console.log({ value })
9+
{
10+
function value() {}
11+
}
12+
};
13+
/* #__PURE__ */ Object.defineProperty($$hoist_0_action, "name", { value: "action" });

0 commit comments

Comments
 (0)