diff --git a/compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-after-early-return.expect.md b/compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-after-early-return.expect.md deleted file mode 100644 index f8146c8510..0000000000 --- a/compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-after-early-return.expect.md +++ /dev/null @@ -1,21 +0,0 @@ - -## Input - -```javascript -function Component(props) { - if (props.cond) { - return null; - } - return useHook(); -} - -``` - - -## Error - -``` -[ReactForget] InvalidInput: Hooks must always be called in a consistent order, and may not be called conditionally. See the Rules of Hooks (https://react.dev/warnings/invalid-hook-call-warning) (5:5) -``` - - \ No newline at end of file diff --git a/compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-for.expect.md b/compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-for.expect.md deleted file mode 100644 index a9acc25430..0000000000 --- a/compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-for.expect.md +++ /dev/null @@ -1,26 +0,0 @@ - -## Input - -```javascript -function Component(props) { - let i = 0; - for (let x = 0; useHook(x) < 10; useHook(i), x++) { - i += useHook(x); - } - return i; -} - -``` - - -## Error - -``` -[ReactForget] InvalidInput: Hooks must always be called in a consistent order, and may not be called conditionally. See the Rules of Hooks (https://react.dev/warnings/invalid-hook-call-warning) (3:3) - -[ReactForget] InvalidInput: Hooks must always be called in a consistent order, and may not be called conditionally. See the Rules of Hooks (https://react.dev/warnings/invalid-hook-call-warning) (4:4) - -[ReactForget] InvalidInput: Hooks must always be called in a consistent order, and may not be called conditionally. See the Rules of Hooks (https://react.dev/warnings/invalid-hook-call-warning) (3:3) -``` - - \ No newline at end of file diff --git a/compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-if-alternate.expect.md b/compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-if-alternate.expect.md deleted file mode 100644 index 51c2925634..0000000000 --- a/compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-if-alternate.expect.md +++ /dev/null @@ -1,23 +0,0 @@ - -## Input - -```javascript -function Component(props) { - let x = null; - if (props.cond) { - } else { - x = useHook(); - } - return x; -} - -``` - - -## Error - -``` -[ReactForget] InvalidInput: Hooks must always be called in a consistent order, and may not be called conditionally. See the Rules of Hooks (https://react.dev/warnings/invalid-hook-call-warning) (5:5) -``` - - \ No newline at end of file diff --git a/compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-if-consequent.expect.md b/compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-if-consequent.expect.md deleted file mode 100644 index d21db9859d..0000000000 --- a/compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-if-consequent.expect.md +++ /dev/null @@ -1,22 +0,0 @@ - -## Input - -```javascript -function Component(props) { - let x = null; - if (props.cond) { - x = useHook(); - } - return x; -} - -``` - - -## Error - -``` -[ReactForget] InvalidInput: Hooks must always be called in a consistent order, and may not be called conditionally. See the Rules of Hooks (https://react.dev/warnings/invalid-hook-call-warning) (4:4) -``` - - \ No newline at end of file