[be][tests] Move PropagateScopeDep fixtures to separate directory

This commit is contained in:
Mofei Zhang
2024-03-27 20:26:14 -04:00
parent a37f242f59
commit 4d37a599e3
51 changed files with 207 additions and 103 deletions
@@ -36,4 +36,12 @@ function TestCondDepInConditionalExpr(props, other) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -45,4 +45,12 @@ function TestCondDepInDirectIfElse(props, other) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -47,4 +47,12 @@ function TestCondDepInNestedIfElse(props, other) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -59,4 +59,12 @@ function TestCondDepInNestedIfElse(props, other) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -58,4 +58,12 @@ function TestCondDepInSwitch(props, other) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -57,4 +57,12 @@ function TestCondDepInSwitchMissingCase(props, other) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -50,4 +50,12 @@ function TestCondDepInSwitchMissingDefault(props, other) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -78,4 +78,12 @@ function TestReactiveDepsInCondScope(props) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -14,8 +14,7 @@ function Component(props) {
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: null }],
};
```
@@ -43,9 +42,10 @@ function Component(props) {
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: null }],
};
```
### Eval output
(kind: ok) [null]
@@ -10,6 +10,5 @@ function Component(props) {
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: null }],
};
@@ -89,4 +89,12 @@ function TestJoinCondDepsInUncondScopes(props) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -22,8 +22,7 @@ function Component(props) {
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: 1 } } }],
};
```
@@ -59,9 +58,10 @@ function Component(props) {
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: 1 } } }],
};
```
### Eval output
(kind: ok) [{"c":1},1]
@@ -18,6 +18,5 @@ function Component(props) {
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: 1 } } }],
};
@@ -9,6 +9,11 @@ function Component(props) {
return x;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{ items: { edges: null, length: 0 } }],
};
```
## Code
@@ -30,5 +35,12 @@ function Component(props) {
return x;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{ items: { edges: null, length: 0 } }],
};
```
### Eval output
(kind: ok) [0,[]]
@@ -4,3 +4,8 @@ function Component(props) {
x.push(props.items?.edges?.map?.(render)?.filter?.(Boolean) ?? []);
return x;
}
export const FIXTURE_ENTRYPOINT = {
fn: Component,
params: [{ items: { edges: null, length: 0 } }],
};
@@ -39,4 +39,12 @@ function TestOnlyConditionalDependencies(props, other) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -41,4 +41,12 @@ function TestPromoteUnconditionalAccessToDependency(props, other) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -45,4 +45,12 @@ function TestConditionalSubpath1(props, other) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -46,4 +46,12 @@ function TestConditionalSubpath2(props, other) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -43,4 +43,12 @@ function TestConditionalSuperpath1(props, other) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -44,4 +44,12 @@ function TestConditionalSuperpath2(props, other) {
}
```
### Eval output
(kind: exception) Fixture not implemented!
logs: ['The above error occurred in the <WrapperTestComponent> component:\n' +
'\n' +
' at WrapperTestComponent (<project_root>/packages/snap/dist/sprout/evaluator.js:54:26)\n' +
'\n' +
'Consider adding an error boundary to your tree to customize error handling behavior.\n' +
'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.']
@@ -14,8 +14,7 @@ function TestNonOverlappingDescendantTracked(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestNonOverlappingDescendantTracked,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { x: {}, c: { x: { y: { z: 3 } } } } }],
};
```
@@ -45,9 +44,10 @@ function TestNonOverlappingDescendantTracked(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestNonOverlappingDescendantTracked,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { x: {}, c: { x: { y: { z: 3 } } } } }],
};
```
### Eval output
(kind: ok) {"c":3}
@@ -10,6 +10,5 @@ function TestNonOverlappingDescendantTracked(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestNonOverlappingDescendantTracked,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { x: {}, c: { x: { y: { z: 3 } } } } }],
};
@@ -13,8 +13,7 @@ function TestNonOverlappingTracked(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestNonOverlappingTracked,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: 2, c: 3 } }],
};
```
@@ -42,9 +41,10 @@ function TestNonOverlappingTracked(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestNonOverlappingTracked,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: 2, c: 3 } }],
};
```
### Eval output
(kind: ok) {"b":2,"c":3}
@@ -9,6 +9,5 @@ function TestNonOverlappingTracked(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestNonOverlappingTracked,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: 2, c: 3 } }],
};
@@ -14,8 +14,7 @@ function TestOverlappingDescendantTracked(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestOverlappingDescendantTracked,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: { x: { y: 5 } } } } }],
};
```
@@ -43,9 +42,10 @@ function TestOverlappingDescendantTracked(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestOverlappingDescendantTracked,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: { x: { y: 5 } } } } }],
};
```
### Eval output
(kind: ok) {"b":{"x":{"y":5}},"c":5,"a":{"b":{"c":"[[ cyclic ref *1 ]]"}}}
@@ -10,6 +10,5 @@ function TestOverlappingDescendantTracked(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestOverlappingDescendantTracked,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: { x: { y: 5 } } } } }],
};
@@ -14,8 +14,7 @@ function TestOverlappingTracked(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestOverlappingTracked,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { c: 2 } }],
};
```
@@ -43,9 +42,10 @@ function TestOverlappingTracked(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestOverlappingTracked,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { c: 2 } }],
};
```
### Eval output
(kind: ok) {"c":2,"a":{"c":2}}
@@ -10,6 +10,5 @@ function TestOverlappingTracked(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestOverlappingTracked,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { c: 2 } }],
};
@@ -14,8 +14,7 @@ function TestDepsSubpathOrder1(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestDepsSubpathOrder1,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: 2 } } }],
};
```
@@ -43,9 +42,10 @@ function TestDepsSubpathOrder1(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestDepsSubpathOrder1,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: 2 } } }],
};
```
### Eval output
(kind: ok) {"b":{"c":2},"a":{"b":"[[ cyclic ref *1 ]]"},"c":2}
@@ -10,6 +10,5 @@ function TestDepsSubpathOrder1(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestDepsSubpathOrder1,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: 2 } } }],
};
@@ -14,8 +14,7 @@ function TestDepsSubpathOrder2(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestDepsSubpathOrder2,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: 2 } } }],
};
```
@@ -43,9 +42,10 @@ function TestDepsSubpathOrder2(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestDepsSubpathOrder2,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: 2 } } }],
};
```
### Eval output
(kind: ok) {"a":{"b":{"c":2}},"b":"[[ cyclic ref *2 ]]","c":2}
@@ -10,6 +10,5 @@ function TestDepsSubpathOrder2(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestDepsSubpathOrder2,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: 2 } } }],
};
@@ -14,8 +14,7 @@ function TestDepsSubpathOrder3(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestDepsSubpathOrder3,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: 2 } } }],
};
```
@@ -43,9 +42,10 @@ function TestDepsSubpathOrder3(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestDepsSubpathOrder3,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: 2 } } }],
};
```
### Eval output
(kind: ok) {"c":2,"a":{"b":{"c":2}},"b":"[[ cyclic ref *2 ]]"}
@@ -10,6 +10,5 @@ function TestDepsSubpathOrder3(props) {
export const FIXTURE_ENTRYPOINT = {
fn: TestDepsSubpathOrder3,
params: ["TodoAdd"],
isComponent: "TodoAdd",
params: [{ a: { b: { c: 2 } } }],
};
@@ -128,14 +128,6 @@ const skipFilter = new Set([
"reactivity-analysis-interleaved-reactivity",
"reassign-object-in-context",
"reassignment-separate-scopes",
"reduce-reactive-cond-memberexpr-join",
"reduce-reactive-uncond-deps-nonoverlap-descendant",
"reduce-reactive-uncond-deps-nonoverlap-direct",
"reduce-reactive-uncond-deps-overlap-descendant",
"reduce-reactive-uncond-deps-overlap-direct",
"reduce-reactive-uncond-deps-subpath-order1",
"reduce-reactive-uncond-deps-subpath-order2",
"reduce-reactive-uncond-deps-subpath-order3",
"return-conditional",
"return-undefined",
"reverse-postorder",
@@ -328,22 +320,6 @@ const skipFilter = new Set([
"reassigned-phi-in-returned-function-expression",
"reassignment-conditional",
"reassignment",
"reduce-reactive-cond-deps-cfg-condexpr",
"reduce-reactive-cond-deps-cfg-ifelse",
"reduce-reactive-cond-deps-cfg-nested-ifelse-missing",
"reduce-reactive-cond-deps-cfg-nested-ifelse",
"reduce-reactive-cond-deps-cfg-switch-missing-case",
"reduce-reactive-cond-deps-cfg-switch-missing-default",
"reduce-reactive-cond-deps-cfg-switch",
"reduce-reactive-cond-deps-no-uncond",
"reduce-reactive-cond-deps-promote-uncond",
"reduce-reactive-cond-deps-subpath-order1",
"reduce-reactive-cond-deps-subpath-order2",
"reduce-reactive-cond-deps-superpath-order1",
"reduce-reactive-cond-deps-superpath-order2",
"reduce-reactive-dependencies-optional-member-expression",
"reduce-reactive-deps-cond-scope",
"reduce-reactive-deps-join-uncond-scopes-cond-deps",
"ref-current-aliased-not-added-to-dep-2",
"ref-current-not-added-to-dep-2",
"ref-in-effect",