@samitouri / QOS-React / commits / 7ba638ef8d

[tests] delete stale .expect files

--- Looks like we delete `.js` files but missed `.expect` files. Jest probably didn't catch this because the basename of the fixtures had duplicates (in rule-of-hooks)

Mofei Zhang committed May 17, 2023 at 14:39 UTC 7ba638ef8d7941abc5aaf4a79bea319dadf424c0
4 files changed -92
compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-after-early-return.expect.md deleted
-21
@@ -1,21 +0,0 @@
1 -
2 -## Input
3 -
4 -```javascript
5 -function Component(props) {
6 - if (props.cond) {
7 - return null;
8 - }
9 - return useHook();
10 -}
11 -
12 -```
13 -
14 -
15 -## Error
16 -
17 -```
18 -[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)
19 -```
20 -
21 -
\ No newline at end of file
compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-for.expect.md deleted
-26
@@ -1,26 +0,0 @@
1 -
2 -## Input
3 -
4 -```javascript
5 -function Component(props) {
6 - let i = 0;
7 - for (let x = 0; useHook(x) < 10; useHook(i), x++) {
8 - i += useHook(x);
9 - }
10 - return i;
11 -}
12 -
13 -```
14 -
15 -
16 -## Error
17 -
18 -```
19 -[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)
20 -
21 -[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)
22 -
23 -[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)
24 -```
25 -
26 -
\ No newline at end of file
compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-if-alternate.expect.md deleted
-23
@@ -1,23 +0,0 @@
1 -
2 -## Input
3 -
4 -```javascript
5 -function Component(props) {
6 - let x = null;
7 - if (props.cond) {
8 - } else {
9 - x = useHook();
10 - }
11 - return x;
12 -}
13 -
14 -```
15 -
16 -
17 -## Error
18 -
19 -```
20 -[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)
21 -```
22 -
23 -
\ No newline at end of file
compiler/forget/src/__tests__/fixtures/compiler/error.invalid-hook-if-consequent.expect.md deleted
-22
@@ -1,22 +0,0 @@
1 -
2 -## Input
3 -
4 -```javascript
5 -function Component(props) {
6 - let x = null;
7 - if (props.cond) {
8 - x = useHook();
9 - }
10 - return x;
11 -}
12 -
13 -```
14 -
15 -
16 -## Error
17 -
18 -```
19 -[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)
20 -```
21 -
22 -
\ No newline at end of file