-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add jsxFragmentFactory compiler option tests
- Loading branch information
Showing
19 changed files
with
211 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
tests/cases/compiler/jsxFactoryAndFragment.tsx(3,1): error TS17016: JSX fragment is not supported when using --jsxFactory | ||
tests/cases/compiler/jsxFactoryAndFragment.tsx(4,1): error TS17016: JSX fragment is not supported when using --jsxFactory | ||
tests/cases/compiler/jsxFactoryAndFragment.tsx(4,17): error TS17016: JSX fragment is not supported when using --jsxFactory | ||
tests/cases/compiler/jsxFactoryAndFragment.tsx(3,1): error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option. | ||
tests/cases/compiler/jsxFactoryAndFragment.tsx(4,1): error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option. | ||
tests/cases/compiler/jsxFactoryAndFragment.tsx(4,17): error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option. | ||
|
||
|
||
==== tests/cases/compiler/jsxFactoryAndFragment.tsx (3 errors) ==== | ||
declare var h: any; | ||
|
||
<></>; | ||
~~~~~ | ||
!!! error TS17016: JSX fragment is not supported when using --jsxFactory | ||
!!! error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option. | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS17016: JSX fragment is not supported when using --jsxFactory | ||
!!! error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option. | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS17016: JSX fragment is not supported when using --jsxFactory | ||
!!! error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option. |
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/jsxFactoryAndJsxFragmentFactory.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [jsxFactoryAndJsxFragmentFactory.tsx] | ||
declare var h: any; | ||
|
||
<></>; | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; | ||
|
||
//// [jsxFactoryAndJsxFragmentFactory.js] | ||
h(Frag, null); | ||
h(Frag, null, | ||
h("span", null, "1"), | ||
h(Frag, null, | ||
h("span", null, "2.1"), | ||
h("span", null, "2.2"))); |
6 changes: 6 additions & 0 deletions
6
tests/baselines/reference/jsxFactoryAndJsxFragmentFactory.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
=== tests/cases/compiler/jsxFactoryAndJsxFragmentFactory.tsx === | ||
declare var h: any; | ||
>h : Symbol(h, Decl(jsxFactoryAndJsxFragmentFactory.tsx, 0, 11)) | ||
|
||
<></>; | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; |
20 changes: 20 additions & 0 deletions
20
tests/baselines/reference/jsxFactoryAndJsxFragmentFactory.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
=== tests/cases/compiler/jsxFactoryAndJsxFragmentFactory.tsx === | ||
declare var h: any; | ||
>h : any | ||
|
||
<></>; | ||
><></> : error | ||
|
||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; | ||
><><span>1</span><><span>2.1</span><span>2.2</span></></> : error | ||
><span>1</span> : error | ||
>span : any | ||
>span : any | ||
><><span>2.1</span><span>2.2</span></> : error | ||
><span>2.1</span> : error | ||
>span : any | ||
>span : any | ||
><span>2.2</span> : error | ||
>span : any | ||
>span : any | ||
|
9 changes: 9 additions & 0 deletions
9
tests/baselines/reference/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
error TS18035: Invalid value for 'jsxFragmentFactory'. '234' is not a valid identifier or qualified-name. | ||
|
||
|
||
!!! error TS18035: Invalid value for 'jsxFragmentFactory'. '234' is not a valid identifier or qualified-name. | ||
==== tests/cases/compiler/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.tsx (0 errors) ==== | ||
declare var h: any; | ||
|
||
<></>; | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; |
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.tsx] | ||
declare var h: any; | ||
|
||
<></>; | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; | ||
|
||
//// [jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.js] | ||
h(React.Fragment, null); | ||
h(React.Fragment, null, | ||
h("span", null, "1"), | ||
h(React.Fragment, null, | ||
h("span", null, "2.1"), | ||
h("span", null, "2.2"))); |
6 changes: 6 additions & 0 deletions
6
tests/baselines/reference/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
=== tests/cases/compiler/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.tsx === | ||
declare var h: any; | ||
>h : Symbol(h, Decl(jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.tsx, 0, 11)) | ||
|
||
<></>; | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; |
20 changes: 20 additions & 0 deletions
20
tests/baselines/reference/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
=== tests/cases/compiler/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.tsx === | ||
declare var h: any; | ||
>h : any | ||
|
||
<></>; | ||
><></> : any | ||
|
||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; | ||
><><span>1</span><><span>2.1</span><span>2.2</span></></> : any | ||
><span>1</span> : any | ||
>span : any | ||
>span : any | ||
><><span>2.1</span><span>2.2</span></> : any | ||
><span>2.1</span> : any | ||
>span : any | ||
>span : any | ||
><span>2.2</span> : any | ||
>span : any | ||
>span : any | ||
|
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/jsxFactoryAndJsxFragmentFactoryNull.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [jsxFactoryAndJsxFragmentFactoryNull.tsx] | ||
declare var h: any; | ||
|
||
<></>; | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; | ||
|
||
//// [jsxFactoryAndJsxFragmentFactoryNull.js] | ||
h(null, null); | ||
h(null, null, | ||
h("span", null, "1"), | ||
h(null, null, | ||
h("span", null, "2.1"), | ||
h("span", null, "2.2"))); |
6 changes: 6 additions & 0 deletions
6
tests/baselines/reference/jsxFactoryAndJsxFragmentFactoryNull.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
=== tests/cases/compiler/jsxFactoryAndJsxFragmentFactoryNull.tsx === | ||
declare var h: any; | ||
>h : Symbol(h, Decl(jsxFactoryAndJsxFragmentFactoryNull.tsx, 0, 11)) | ||
|
||
<></>; | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; |
20 changes: 20 additions & 0 deletions
20
tests/baselines/reference/jsxFactoryAndJsxFragmentFactoryNull.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
=== tests/cases/compiler/jsxFactoryAndJsxFragmentFactoryNull.tsx === | ||
declare var h: any; | ||
>h : any | ||
|
||
<></>; | ||
><></> : error | ||
|
||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; | ||
><><span>1</span><><span>2.1</span><span>2.2</span></></> : error | ||
><span>1</span> : error | ||
>span : any | ||
>span : any | ||
><><span>2.1</span><span>2.2</span></> : error | ||
><span>2.1</span> : error | ||
>span : any | ||
>span : any | ||
><span>2.2</span> : error | ||
>span : any | ||
>span : any | ||
|
16 changes: 16 additions & 0 deletions
16
tests/baselines/reference/jsxFactoryButNoJsxFragmentFactory.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
tests/cases/compiler/jsxFactoryButNoJsxFragmentFactory.tsx(3,1): error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option. | ||
tests/cases/compiler/jsxFactoryButNoJsxFragmentFactory.tsx(4,1): error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option. | ||
tests/cases/compiler/jsxFactoryButNoJsxFragmentFactory.tsx(4,17): error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option. | ||
|
||
|
||
==== tests/cases/compiler/jsxFactoryButNoJsxFragmentFactory.tsx (3 errors) ==== | ||
declare var h: any; | ||
|
||
<></>; | ||
~~~~~ | ||
!!! error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option. | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option. | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS17016: The 'jsxFragmentFactory' compiler option must be provided to use JSX fragments with the 'jsxFactory' compiler option. |
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/jsxFactoryButNoJsxFragmentFactory.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [jsxFactoryButNoJsxFragmentFactory.tsx] | ||
declare var h: any; | ||
|
||
<></>; | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; | ||
|
||
//// [jsxFactoryButNoJsxFragmentFactory.js] | ||
h(React.Fragment, null); | ||
h(React.Fragment, null, | ||
h("span", null, "1"), | ||
h(React.Fragment, null, | ||
h("span", null, "2.1"), | ||
h("span", null, "2.2"))); |
6 changes: 6 additions & 0 deletions
6
tests/baselines/reference/jsxFactoryButNoJsxFragmentFactory.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
=== tests/cases/compiler/jsxFactoryButNoJsxFragmentFactory.tsx === | ||
declare var h: any; | ||
>h : Symbol(h, Decl(jsxFactoryButNoJsxFragmentFactory.tsx, 0, 11)) | ||
|
||
<></>; | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; |
20 changes: 20 additions & 0 deletions
20
tests/baselines/reference/jsxFactoryButNoJsxFragmentFactory.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
=== tests/cases/compiler/jsxFactoryButNoJsxFragmentFactory.tsx === | ||
declare var h: any; | ||
>h : any | ||
|
||
<></>; | ||
><></> : any | ||
|
||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; | ||
><><span>1</span><><span>2.1</span><span>2.2</span></></> : any | ||
><span>1</span> : any | ||
>span : any | ||
>span : any | ||
><><span>2.1</span><span>2.2</span></> : any | ||
><span>2.1</span> : any | ||
>span : any | ||
>span : any | ||
><span>2.2</span> : any | ||
>span : any | ||
>span : any | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//@jsx: react | ||
//@jsxFactory: h | ||
//@jsxFragmentFactory: Frag | ||
|
||
declare var h: any; | ||
|
||
<></>; | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; |
8 changes: 8 additions & 0 deletions
8
tests/cases/compiler/jsxFactoryAndJsxFragmentFactoryErrorNotIdentifier.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//@jsx: react | ||
//@jsxFactory: h | ||
//@jsxFragmentFactory: 234 | ||
|
||
declare var h: any; | ||
|
||
<></>; | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//@jsx: react | ||
//@jsxFactory: h | ||
//@jsxFragmentFactory: null | ||
|
||
declare var h: any; | ||
|
||
<></>; | ||
<><span>1</span><><span>2.1</span><span>2.2</span></></>; |
File renamed without changes.