@@ -97,6 +97,78 @@ const WithAttrsWrapped = styled(Inner).attrs({
9797} )\`\` ;"
9898` ;
9999
100+ exports [` fixtures should annotate create global style with pure comments 1` ] = `
101+ "const GlobalStyle =
102+ /*#__PURE__*/
103+ createGlobalStyle\`
104+ body {
105+ color : red ;
106+ }
107+ \` ;"
108+ ` ;
109+
110+ exports [` fixtures should annotate css with pure comments 1` ] = `
111+ "const partial =
112+ /*#__PURE__*/
113+ css([\\ "color:red;\\ "]);
114+ const Component =
115+ /*#__PURE__*/
116+ styled.div.withConfig({
117+ displayName : \\" annotate-css-with-pure-comments__Component\\ " ,
118+ componentId : \\" sc-17hq72a-0\\ "
119+ } )([\\ "\\ ", \\ ";background:blue;\\ "], partial);"
120+ ` ;
121+
122+ exports [` fixtures should annotate keyframes with pure comments 1` ] = `
123+ "const Animation =
124+ /*#__PURE__*/
125+ keyframes([\\ "0%{ opacity :0 ;} 100%{ opacity :1 ;} \\ "]);"
126+ ` ;
127+
128+ exports [` fixtures should annotate styled calls with pure comments 1` ] = `
129+ "const Test =
130+ /*#__PURE__*/
131+ styled.div.withConfig({
132+ displayName : \\" annotate-styled-calls-with-pure-comments__Test\\ " ,
133+ componentId : \\" sc-6tnjs3-0\\ "
134+ } )([\\ "width:100%;\\ "]);
135+ const Test2 =
136+ /*#__PURE__*/
137+ styled('div').withConfig({
138+ displayName : \\" annotate-styled-calls-with-pure-comments__Test2\\ " ,
139+ componentId : \\" sc-6tnjs3-1\\ "
140+ } )([\\ "\\ "]);
141+ const Test3 = true ? styled.div.withConfig({
142+ displayName : \\" annotate-styled-calls-with-pure-comments__Test3\\ " ,
143+ componentId : \\" sc-6tnjs3-2\\ "
144+ } )([\\ "\\ "]) : styled.div.withConfig({
145+ displayName : \\" annotate-styled-calls-with-pure-comments__Test3\\ " ,
146+ componentId : \\" sc-6tnjs3-3\\ "
147+ } )([\\ "\\ "]);
148+ const styles = {
149+ One : styled .div .withConfig ({
150+ displayName: \\" annotate-styled-calls-with-pure-comments__One\\ " ,
151+ componentId: \\" sc-6tnjs3-4\\ "
152+ })([\\" \\ " ])
153+ } ;
154+ let Component;
155+ Component = styled.div.withConfig({
156+ displayName : \\" annotate-styled-calls-with-pure-comments__Component\\ " ,
157+ componentId : \\" sc-6tnjs3-5\\ "
158+ } )([\\ "\\ "]);
159+ const WrappedComponent =
160+ /*#__PURE__*/
161+ styled(Inner).withConfig({
162+ displayName : \\" annotate-styled-calls-with-pure-comments__WrappedComponent\\ " ,
163+ componentId : \\" sc-6tnjs3-6\\ "
164+ } )([\\ "\\ "]);
165+ const notStyled =
166+ /*#__PURE__*/
167+ styled.div('')\`\` ; // not transpiled by styled components but should add pure comment
168+
169+ const normalFunc = add(5, 3);"
170+ ` ;
171+
100172exports [` fixtures should does not desugar styled assignment 1` ] = `
101173"const domElements = ['div'];
102174
0 commit comments