diff --git a/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/should-bailout-without-compilation-annotation-mode.expect.md b/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/should-bailout-without-compilation-annotation-mode.expect.md new file mode 100644 index 0000000000..2c3d447dec --- /dev/null +++ b/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/should-bailout-without-compilation-annotation-mode.expect.md @@ -0,0 +1,39 @@ + +## Input + +```javascript +// @gating @panicThreshold(NONE) @compilationMode(annotation) +let someGlobal = "joe"; + +function Component() { + "use forget"; + someGlobal = "wat"; + return null; +} + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + +``` + +## Code + +```javascript +// @gating @panicThreshold(NONE) @compilationMode(annotation) +let someGlobal = "joe"; + +function Component() { + "use forget"; + someGlobal = "wat"; + return null; +} + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + +``` + \ No newline at end of file diff --git a/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/should-bailout-without-compilation-annotation-mode.js b/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/should-bailout-without-compilation-annotation-mode.js new file mode 100644 index 0000000000..f8e162c208 --- /dev/null +++ b/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/should-bailout-without-compilation-annotation-mode.js @@ -0,0 +1,13 @@ +// @gating @panicThreshold(NONE) @compilationMode(annotation) +let someGlobal = "joe"; + +function Component() { + "use forget"; + someGlobal = "wat"; + return null; +} + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; diff --git a/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/should-bailout-without-compilation-infer-mode.expect.md b/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/should-bailout-without-compilation-infer-mode.expect.md new file mode 100644 index 0000000000..ca8f6c43c1 --- /dev/null +++ b/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/should-bailout-without-compilation-infer-mode.expect.md @@ -0,0 +1,37 @@ + +## Input + +```javascript +// @gating @panicThreshold(NONE) @compilationMode(infer) +let someGlobal = "joe"; + +function Component() { + someGlobal = "wat"; + return
{someGlobal}
; +} + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + +``` + +## Code + +```javascript +// @gating @panicThreshold(NONE) @compilationMode(infer) +let someGlobal = "joe"; + +function Component() { + someGlobal = "wat"; + return
{someGlobal}
; +} + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +}; + +``` + \ No newline at end of file diff --git a/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/should-bailout-without-compilation-infer-mode.js b/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/should-bailout-without-compilation-infer-mode.js new file mode 100644 index 0000000000..a9c6d0afbd --- /dev/null +++ b/compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/should-bailout-without-compilation-infer-mode.js @@ -0,0 +1,12 @@ +// @gating @panicThreshold(NONE) @compilationMode(infer) +let someGlobal = "joe"; + +function Component() { + someGlobal = "wat"; + return
{someGlobal}
; +} + +export const FIXTURE_ENTRYPOINT = { + fn: Component, + params: [], +};