Skip to content

Commit a52a1d0

Browse files
committed
chore: add test for skipTrivia
1 parent 0d25217 commit a52a1d0

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

tests/baselines/reference/jsxInvalidEsprimaTestSuite.errors.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ tests/cases/conformance/jsx/16.tsx(1,2): error TS17008: JSX element 'a' has no c
3333
tests/cases/conformance/jsx/16.tsx(1,10): error TS1005: '</' expected.
3434
tests/cases/conformance/jsx/17.tsx(1,2): error TS17008: JSX element 'a' has no corresponding closing tag.
3535
tests/cases/conformance/jsx/17.tsx(1,10): error TS1005: '</' expected.
36-
tests/cases/conformance/jsx/18.tsx(1,9): error TS2657: JSX expressions must have one parent element.
36+
tests/cases/conformance/jsx/18.tsx(1,30): error TS2657: JSX expressions must have one parent element.
3737
tests/cases/conformance/jsx/19.tsx(1,9): error TS2657: JSX expressions must have one parent element.
3838
tests/cases/conformance/jsx/2.tsx(1,3): error TS1003: Identifier expected.
3939
tests/cases/conformance/jsx/20.tsx(1,10): error TS1005: '}' expected.
@@ -227,8 +227,8 @@ tests/cases/conformance/jsx/9.tsx(1,16): error TS1109: Expression expected.
227227

228228
!!! error TS1005: '</' expected.
229229
==== tests/cases/conformance/jsx/18.tsx (1 errors) ====
230-
var x = <div>one</div><div>two</div>;;
231-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230+
var x = /* Leading trivia */ <div>one</div><div>two</div>;;
231+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
232232
!!! error TS2657: JSX expressions must have one parent element.
233233
==== tests/cases/conformance/jsx/19.tsx (1 errors) ====
234234
var x = <div>one</div> /* intervening comment */ <div>two</div>;;

tests/baselines/reference/jsxInvalidEsprimaTestSuite.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ declare var React: any;
3737
//// [17.tsx]
3838
<a b={}>;
3939
//// [18.tsx]
40-
var x = <div>one</div><div>two</div>;;
40+
var x = /* Leading trivia */ <div>one</div><div>two</div>;;
4141
//// [19.tsx]
4242
var x = <div>one</div> /* intervening comment */ <div>two</div>;;
4343
//// [20.tsx]
@@ -117,7 +117,7 @@ a['foo'] > ;
117117
//// [17.jsx]
118118
<a b=>;</>;
119119
//// [18.jsx]
120-
var x = <div>one</div>, <div>two</div>;
120+
var x = /* Leading trivia */ <div>one</div>, <div>two</div>;
121121
;
122122
//// [19.jsx]
123123
var x = <div>one</div> /* intervening comment */, /* intervening comment */ <div>two</div>;

tests/baselines/reference/jsxInvalidEsprimaTestSuite.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ No type information for this code.=== tests/cases/conformance/jsx/17.tsx ===
5050
>b : Symbol(b, Decl(17.tsx, 0, 2))
5151

5252
=== tests/cases/conformance/jsx/18.tsx ===
53-
var x = <div>one</div><div>two</div>;;
53+
var x = /* Leading trivia */ <div>one</div><div>two</div>;;
5454
>x : Symbol(x, Decl(18.tsx, 0, 3), Decl(19.tsx, 0, 3))
5555

5656
=== tests/cases/conformance/jsx/19.tsx ===

tests/baselines/reference/jsxInvalidEsprimaTestSuite.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ declare var React: any;
159159
> : any
160160

161161
=== tests/cases/conformance/jsx/18.tsx ===
162-
var x = <div>one</div><div>two</div>;;
162+
var x = /* Leading trivia */ <div>one</div><div>two</div>;;
163163
>x : any
164164
><div>one</div><div>two</div> : any
165165
><div>one</div> : any

tests/cases/conformance/jsx/jsxInvalidEsprimaTestSuite.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ declare var React: any;
3636
// @filename: 17.tsx
3737
<a b={}>;
3838
// @filename: 18.tsx
39-
var x = <div>one</div><div>two</div>;;
39+
var x = /* Leading trivia */ <div>one</div><div>two</div>;;
4040
// @filename: 19.tsx
4141
var x = <div>one</div> /* intervening comment */ <div>two</div>;;
4242
// @filename: 20.tsx

0 commit comments

Comments
 (0)