Skip to content

Commit b50956d

Browse files
committed
Remove jsx-mode from tests
1 parent 0a3df48 commit b50956d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+104
-1063
lines changed

scripts/test_syntax.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ done <temp/files.txt
4545
# printing with ast conversion
4646
find syntax_tests/data/ast-mapping -name "*.res" -o -name "*.resi" -o -name "*.ml" -o -name "*.mli" >temp/files.txt
4747
while read file; do
48-
$DUNE_BIN_DIR/res_parser -test-ast-conversion -jsx-version 4 -jsx-mode "automatic" $file &> $(exp $file) & maybeWait
48+
$DUNE_BIN_DIR/res_parser -test-ast-conversion -jsx-version 4 $file &> $(exp $file) & maybeWait
4949
done <temp/files.txt
5050

5151
# printing with ppx
5252
find syntax_tests/data/ppx/react -name "*.res" -o -name "*.resi" >temp/files.txt
5353
while read file; do
54-
$DUNE_BIN_DIR/res_parser -jsx-version 4 -jsx-mode "automatic" $file &> $(exp $file) & maybeWait
54+
$DUNE_BIN_DIR/res_parser -jsx-version 4 $file &> $(exp $file) & maybeWait
5555
done <temp/files.txt
5656

5757
wait

tests/analysis_tests/tests/src/CompletableComponent.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
type status = On | Off
22

3-
@@jsxConfig({version: 4, mode: "automatic"})
3+
@@jsxConfig({version: 4})
44

55
@react.component
66
let make = (~status: status, ~name: string) => {

tests/analysis_tests/tests/src/CompletionJsxProps.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ let tsomeVar = #two
3535
// let _ = <CompletionSupport.TestComponent on={t}
3636
// ^com
3737

38-
@@jsxConfig({version: 4, mode: "automatic"})
38+
@@jsxConfig({version: 4})
3939

4040
module CompletableComponentLazy = {
4141
let loadComponent = () => import(CompletableComponent.make)

tests/analysis_tests/tests/src/typeConstraint.res

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
@@jsxConfig({version: 4, mode: "classic"})
2-
3-
module V4C = {
4-
@react.component
5-
let make:
6-
type a. (~a: a, ~b: a, a) => React.element =
7-
(~a, ~b, _) => <div />
8-
}
9-
10-
let v4c = <V4C a=1 b=2 />
11-
12-
@@jsxConfig({version: 4, mode: "automatic"})
1+
@@jsxConfig({version: 4})
132

143
module V4A = {
154
@react.component

tests/syntax_tests/data/ppx/react/aliasProps.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@@jsxConfig({version: 4, mode: "automatic"})
1+
@@jsxConfig({version: 4})
22

33
module C0 = {
44
@react.component

tests/syntax_tests/data/ppx/react/expected/aliasProps.res.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@@jsxConfig({version: 4, mode: "automatic"})
1+
@@jsxConfig({version: 4})
22

33
module C0 = {
44
@res.jsxComponentProps

tests/syntax_tests/data/ppx/react/expected/externalWithCustomName.res.txt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
@@jsxConfig({version: 4, mode: "classic"})
2-
3-
module Foo = {
4-
@res.jsxComponentProps @live
5-
type props<'a, 'b> = {a: 'a, b: 'b}
6-
7-
@module("Foo")
8-
external component: React.componentLike<props<int, string>, React.element> = "component"
9-
}
10-
11-
let t = React.createElement(Foo.component, {a: 1, b: {"1"}})
12-
13-
@@jsxConfig({version: 4, mode: "automatic"})
1+
@@jsxConfig({version: 4})
142

153
module Foo = {
164
@res.jsxComponentProps @live

tests/syntax_tests/data/ppx/react/expected/externalWithRef.res.txt

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,4 @@
1-
@@jsxConfig({version: 4, mode: "classic"})
2-
3-
module V4C = {
4-
@res.jsxComponentProps @live
5-
type props<'x, 'ref> = {
6-
x: 'x,
7-
ref?: 'ref,
8-
}
9-
10-
@module("componentForwardRef")
11-
external make: React.componentLike<props<string, ReactDOM.Ref.currentDomRef>, React.element> =
12-
"component"
13-
}
14-
15-
module type V4CType = {
16-
@res.jsxComponentProps @live
17-
type props<'x, 'y> = {
18-
x: 'x,
19-
y: 'y,
20-
}
21-
22-
@module("someModule")
23-
external make: React.componentLike<props<string, string>, React.element> = "component"
24-
}
25-
26-
@@jsxConfig({version: 4, mode: "automatic"})
1+
@@jsxConfig({version: 4})
272

283
module V4C = {
294
@res.jsxComponentProps @live

tests/syntax_tests/data/ppx/react/expected/externalWithTypeVariables.res.txt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
1-
@@jsxConfig({version: 4, mode: "classic"})
2-
3-
module V4C = {
4-
@res.jsxComponentProps @live
5-
type props<'x, 'children> = {
6-
x: 'x,
7-
children: 'children,
8-
}
9-
10-
@module("c")
11-
external make: React.componentLike<props<t<'a>, React.element>, React.element> = "component"
12-
}
13-
14-
@@jsxConfig({version: 4, mode: "automatic"})
1+
@@jsxConfig({version: 4})
152

163
module V4C = {
174
@res.jsxComponentProps @live

tests/syntax_tests/data/ppx/react/expected/fileLevelConfig.res.txt

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
1-
@@jsxConfig({version: 4, mode: "classic"})
2-
3-
module V4C = {
4-
@res.jsxComponentProps
5-
type props<'msg> = {msg: 'msg}
6-
7-
let make = ({msg, _}: props<_>) => {
8-
ReactDOM.createDOMElementVariadic("div", [{msg->React.string}])
9-
}
10-
let make = {
11-
let \"FileLevelConfig$V4C" = (props: props<_>) => make(props)
12-
13-
\"FileLevelConfig$V4C"
14-
}
15-
}
16-
17-
@@jsxConfig({version: 4, mode: "automatic"})
1+
@@jsxConfig({version: 4})
182

193
module V4A = {
204
@res.jsxComponentProps

0 commit comments

Comments
 (0)