Skip to content

Commit ec49a4b

Browse files
committed
fix test
1 parent 875834c commit ec49a4b

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

res_syntax/tests/ppx/react/aliasProps.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ module C1 = {
1212

1313
module C2 = {
1414
@react.component
15-
let make = (~foo as bar="") => <div />
15+
let make = (~foo as bar="") => React.string(bar)
1616
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
module C0 = {
2+
let a = 1
23
@react.component
3-
let make = (~a=2, ~b=a*2) => <div />
4+
let make = (~a=2, ~b=a*2) => React.int(a + b)
45
}
56

67
module C1 = {
78
@react.component
8-
let make = (~a=2, ~b) => <div />
9+
let make = (~a=2, ~b) => React.int(a + b)
910
}

res_syntax/tests/ppx/react/expected/aliasProps.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module C2 = {
5050
| None => ""
5151
}
5252

53-
ReactDOM.jsx("div", {})
53+
React.string(bar)
5454
}
5555
let make = {
5656
let \"AliasProps$C2" = (props: props<_>) => make(props)

res_syntax/tests/ppx/react/expected/defaultValueProp.res.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
module C0 = {
2+
let a = 1
23
type props<'a, 'b> = {a?: 'a, b?: 'b}
4+
35
@react.component
46
let make = (props: props<'a, 'b>) => {
57
let b = switch props.b {
@@ -11,10 +13,11 @@ module C0 = {
1113
| None => 2
1214
}
1315

14-
ReactDOM.jsx("div", {})
16+
React.int(a + b)
1517
}
1618
let make = {
1719
let \"DefaultValueProp$C0" = (props: props<_>) => make(props)
20+
1821
\"DefaultValueProp$C0"
1922
}
2023
}
@@ -30,7 +33,7 @@ module C1 = {
3033
| None => 2
3134
}
3235

33-
ReactDOM.jsx("div", {})
36+
React.int(a + b)
3437
}
3538
let make = {
3639
let \"DefaultValueProp$C1" = (props: props<_>) => make(props)

0 commit comments

Comments
 (0)