Skip to content

Commit eebc404

Browse files
committed
Add more tests with broken cases
1 parent 0b7dfc4 commit eebc404

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

src/__tests__/baselines/minification-only/issue36-extended.ts.baseline

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,35 @@ Source code:
1111
border: \${'solid'} 10px;
1212
\`
1313

14+
styled.div\`
15+
border: \${'solid'}// comment here
16+
10px;
17+
border: solid// comment here
18+
10px;
19+
\`
20+
21+
styled.div\`
22+
border: \${'solid'}/* comment here
23+
*/10px;
24+
border: \${'solid'}/* comment here
25+
*/ 10px;
26+
\`
27+
1428

1529
TypeScript before transform:
1630

1731
declare const styled: any;
1832
export const A = styled.div \`\\n border: \${"solid"} 10px;\\n\`;
33+
styled.div \`\\n border: \${"solid"}// comment here\\n10px;\\n border: solid// comment here\\n10px;\\n\`;
34+
styled.div \`\\n border: \${"solid"}/* comment here\\n*/10px;\\n border: \${"solid"}/* comment here\\n*/ 10px;\\n\`;
1935

2036

2137
TypeScript after transform:
2238

2339
declare const styled: any;
2440
export const A = styled.div \`border:\${'solid'} 10px;\`;
41+
styled.div \`border:\${'solid'}10px;border:solid10px;\`;
42+
styled.div \`border:\${'solid'} 10px;border:\${'solid'} 10px;\`;
2543

2644

2745

src/__tests__/baselines/minification/issue36-extended.ts.baseline

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,35 @@ Source code:
1111
border: \${'solid'} 10px;
1212
\`
1313

14+
styled.div\`
15+
border: \${'solid'}// comment here
16+
10px;
17+
border: solid// comment here
18+
10px;
19+
\`
20+
21+
styled.div\`
22+
border: \${'solid'}/* comment here
23+
*/10px;
24+
border: \${'solid'}/* comment here
25+
*/ 10px;
26+
\`
27+
1428

1529
TypeScript before transform:
1630

1731
declare const styled: any;
1832
export const A = styled.div \`\\n border: \${"solid"} 10px;\\n\`;
33+
styled.div \`\\n border: \${"solid"}// comment here\\n10px;\\n border: solid// comment here\\n10px;\\n\`;
34+
styled.div \`\\n border: \${"solid"}/* comment here\\n*/10px;\\n border: \${"solid"}/* comment here\\n*/ 10px;\\n\`;
1935

2036

2137
TypeScript after transform:
2238

2339
declare const styled: any;
2440
export const A = styled.div.withConfig({ displayName: "A" }) \`border:\${'solid'} 10px;\`;
41+
styled.div \`border:\${'solid'}10px;border:solid10px;\`;
42+
styled.div \`border:\${'solid'} 10px;border:\${'solid'} 10px;\`;
2543

2644

2745

src/__tests__/fixtures/minification/issue36-extended.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,17 @@ declare const styled: any;
33
export const A = styled.div`
44
border: ${'solid'} 10px;
55
`
6+
7+
styled.div`
8+
border: ${'solid'}// comment here
9+
10px;
10+
border: solid// comment here
11+
10px;
12+
`
13+
14+
styled.div`
15+
border: ${'solid'}/* comment here
16+
*/10px;
17+
border: ${'solid'}/* comment here
18+
*/ 10px;
19+
`

0 commit comments

Comments
 (0)