Skip to content

Commit 9415d85

Browse files
committed
Add test for line break
1 parent 5055fca commit 9415d85

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/constant-propagation-template-literal.expect.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ function foo() {
3131
`${Number.MAX_VALUE}`,
3232
`${Number.MIN_VALUE}`,
3333
`${-0}`,
34+
`
35+
`,
3436
`${{}}`,
3537
`${[1, 2, 3]}`,
3638
`${true}`,
@@ -95,6 +97,8 @@ function foo() {
9597
`${Number.MAX_VALUE}`,
9698
`${Number.MIN_VALUE}`,
9799
"0",
100+
"\n ",
101+
98102
`${{}}`,
99103
`${[1, 2, 3]}`,
100104
"true",
@@ -129,4 +133,4 @@ export const FIXTURE_ENTRYPOINT = {
129133
```
130134
131135
### Eval output
132-
(kind: ok) <div>{"value":[true,true,"a\nb","\n","a1b"," abc A\n\nŧ","abc1def","abc1def2","abc1def2ghi","a4bcde6f","120","NaN","Infinity","-Infinity","9007199254740991","-9007199254740991","1.7976931348623157e+308","5e-324","0","[object Object]","1,2,3","true","false","null","undefined","1234567890","0123456789","01234567890","01234567890","0123401234567890123456789067890","012340123456789067890","0","",""]}</div>
136+
(kind: ok) <div>{"value":[true,true,"a\nb","\n","a1b"," abc A\n\nŧ","abc1def","abc1def2","abc1def2ghi","a4bcde6f","120","NaN","Infinity","-Infinity","9007199254740991","-9007199254740991","1.7976931348623157e+308","5e-324","0","\n ","[object Object]","1,2,3","true","false","null","undefined","1234567890","0123456789","01234567890","01234567890","0123401234567890123456789067890","012340123456789067890","0","",""]}</div>

compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/constant-propagation-template-literal.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ function foo() {
2727
`${Number.MAX_VALUE}`,
2828
`${Number.MIN_VALUE}`,
2929
`${-0}`,
30+
`
31+
`,
3032
`${{}}`,
3133
`${[1, 2, 3]}`,
3234
`${true}`,

0 commit comments

Comments
 (0)