Skip to content

Commit e088adb

Browse files
committed
test(core): add css tags tests
1 parent 636d2ea commit e088adb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/createStyledComponentsTransformer.spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,22 @@ const testCases: TestCase[] = [
140140
`,
141141
output: `var Foo = styled.div.withConfig({ componentId: "${fileHash}", displayName: "Foo" }) \`p1:"\\\\n bar ";p2:\${"p2"};p3:\${"p3"} p4:""\`;`,
142142
},
143+
{
144+
name: 'css tags',
145+
input: `css\`
146+
foo: bar;
147+
bar: foo;
148+
\`;keyframes\`
149+
foo: bar;
150+
bar: foo;
151+
\`;createGlobalStyle\`
152+
foo: bar;
153+
bar: foo;
154+
\`;injectGlobal\`
155+
foo: bar;
156+
bar: foo; \`;other\` foo: bar; \``,
157+
output: `css \`foo:bar;bar:foo;\`;\nkeyframes \`foo:bar;bar:foo;\`;\ncreateGlobalStyle \`foo:bar;bar:foo;\`;\ninjectGlobal \`foo:bar;bar:foo;\`;\nother \` foo: bar; \`;`,
158+
},
143159
];
144160

145161
describe('createStyledComponentsTransformer', () => {

0 commit comments

Comments
 (0)