From 6c091cb5fe486c0c0988093dd1e7e75fe4b36dea Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Sat, 11 Jan 2025 00:57:56 +0800 Subject: [PATCH] add `export const FIXTURE_ENTRYPOINT` --- .../arrow-function-with-implicit-return.expect.md | 12 +++++++++++- .../compiler/arrow-function-with-implicit-return.js | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/arrow-function-with-implicit-return.expect.md b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/arrow-function-with-implicit-return.expect.md index 9947101722225..244e70bbbab87 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/arrow-function-with-implicit-return.expect.md +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/arrow-function-with-implicit-return.expect.md @@ -5,6 +5,11 @@ // @compilationMode(infer) const Test = () =>
; +export const FIXTURE_ENTRYPOINT = { + fn: Test, + params: [{}], +}; + ``` ## Code @@ -23,7 +28,12 @@ const Test = () => { return t0; }; +export const FIXTURE_ENTRYPOINT = { + fn: Test, + params: [{}], +}; + ``` ### Eval output -(kind: exception) Fixture not implemented \ No newline at end of file +(kind: ok)
\ No newline at end of file diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/arrow-function-with-implicit-return.js b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/arrow-function-with-implicit-return.js index 52d8936b8b54c..d2b29b1889b40 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/arrow-function-with-implicit-return.js +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/arrow-function-with-implicit-return.js @@ -1,2 +1,7 @@ // @compilationMode(infer) const Test = () =>
; + +export const FIXTURE_ENTRYPOINT = { + fn: Test, + params: [{}], +};