Skip to content

Commit aff4796

Browse files
committed
Add repro test cases
1 parent e77f358 commit aff4796

File tree

6 files changed

+169
-0
lines changed

6 files changed

+169
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`issue36-extended.ts 1`] = `
4+
5+
File: issue36-extended.ts
6+
Source code:
7+
8+
declare const styled: any;
9+
10+
export const A = styled.div\`
11+
border: \${'solid'} 10px;
12+
\`
13+
14+
15+
TypeScript before transform:
16+
17+
declare const styled: any;
18+
export const A = styled.div \`\\n border: \${"solid"} 10px;\\n\`;
19+
20+
21+
TypeScript after transform:
22+
23+
declare const styled: any;
24+
export const A = styled.div \`border:\${'solid'}10px;\`;
25+
26+
27+
28+
`;
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`issue36.tsx 1`] = `
4+
5+
File: issue36.tsx
6+
Source code:
7+
8+
declare const keyframes: any;
9+
declare const styled: any;
10+
11+
const rotate360 = keyframes\`
12+
from {
13+
transform: rotate(0deg);
14+
}
15+
to {
16+
transform: rotate(360deg);
17+
}
18+
\`;
19+
20+
export const StyledDiv = styled.div\`
21+
width: 100px;
22+
height: 100px;
23+
background-color: greenyellow;
24+
animation: \${rotate360} 2s linear infinite;
25+
\`;
26+
27+
28+
TypeScript before transform:
29+
30+
declare const keyframes: any;
31+
declare const styled: any;
32+
const rotate360 = keyframes \`\\n from {\\n transform: rotate(0deg);\\n }\\n to {\\n transform: rotate(360deg);\\n }\\n\`;
33+
export const StyledDiv = styled.div \`\\n width: 100px;\\n height: 100px;\\n background-color: greenyellow;\\n animation: \${rotate360} 2s linear infinite;\\n\`;
34+
35+
36+
TypeScript after transform:
37+
38+
declare const keyframes: any;
39+
declare const styled: any;
40+
const rotate360 = keyframes \`from{transform:rotate(0deg);}to{transform:rotate(360deg);}\`;
41+
export const StyledDiv = styled.div \`width:100px;height:100px;background-color:greenyellow;animation:\${rotate360}2s linear infinite;\`;
42+
43+
44+
45+
`;
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`issue36-extended.ts 1`] = `
4+
5+
File: issue36-extended.ts
6+
Source code:
7+
8+
declare const styled: any;
9+
10+
export const A = styled.div\`
11+
border: \${'solid'} 10px;
12+
\`
13+
14+
15+
TypeScript before transform:
16+
17+
declare const styled: any;
18+
export const A = styled.div \`\\n border: \${"solid"} 10px;\\n\`;
19+
20+
21+
TypeScript after transform:
22+
23+
declare const styled: any;
24+
export const A = styled.div.withConfig({ displayName: "A" }) \`border:\${'solid'}10px;\`;
25+
26+
27+
28+
`;
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`issue36.tsx 1`] = `
4+
5+
File: issue36.tsx
6+
Source code:
7+
8+
declare const keyframes: any;
9+
declare const styled: any;
10+
11+
const rotate360 = keyframes\`
12+
from {
13+
transform: rotate(0deg);
14+
}
15+
to {
16+
transform: rotate(360deg);
17+
}
18+
\`;
19+
20+
export const StyledDiv = styled.div\`
21+
width: 100px;
22+
height: 100px;
23+
background-color: greenyellow;
24+
animation: \${rotate360} 2s linear infinite;
25+
\`;
26+
27+
28+
TypeScript before transform:
29+
30+
declare const keyframes: any;
31+
declare const styled: any;
32+
const rotate360 = keyframes \`\\n from {\\n transform: rotate(0deg);\\n }\\n to {\\n transform: rotate(360deg);\\n }\\n\`;
33+
export const StyledDiv = styled.div \`\\n width: 100px;\\n height: 100px;\\n background-color: greenyellow;\\n animation: \${rotate360} 2s linear infinite;\\n\`;
34+
35+
36+
TypeScript after transform:
37+
38+
declare const keyframes: any;
39+
declare const styled: any;
40+
const rotate360 = keyframes \`from{transform:rotate(0deg);}to{transform:rotate(360deg);}\`;
41+
export const StyledDiv = styled.div.withConfig({ displayName: "StyledDiv" }) \`width:100px;height:100px;background-color:greenyellow;animation:\${rotate360}2s linear infinite;\`;
42+
43+
44+
45+
`;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
declare const styled: any;
2+
3+
export const A = styled.div`
4+
border: ${'solid'} 10px;
5+
`
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
declare const keyframes: any;
2+
declare const styled: any;
3+
4+
const rotate360 = keyframes`
5+
from {
6+
transform: rotate(0deg);
7+
}
8+
to {
9+
transform: rotate(360deg);
10+
}
11+
`;
12+
13+
export const StyledDiv = styled.div`
14+
width: 100px;
15+
height: 100px;
16+
background-color: greenyellow;
17+
animation: ${rotate360} 2s linear infinite;
18+
`;

0 commit comments

Comments
 (0)