Skip to content

Commit 9b5ca27

Browse files
committed
Add tests
1 parent 23094c7 commit 9b5ca27

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

tests/fixtures/custom-jsx/index.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ const s = tw(Foo)('sm:p-1 p-2');
2222
const t = tw(Foo)(Bar)('sm:p-1 p-2');
2323
const u = no(Foo)('sm:p-1 p-2');
2424
const v = no.tw(Foo)('sm:p-1 p-2');
25+
const w = tw.div(Foo)`sm:p-1 p-2`;
26+
const x = tw(Foo).div`sm:p-1 p-2`;
27+
const y = no.tw(Foo)`sm:p-1 p-2`;
28+
const z = no(Foo).tw`sm:p-1 p-2`;
2529

2630
const A = (props) => <div className={props.sortMe} />;
2731
const B = () => <A sortMe="sm:p-1 p-2" dontSort="sm:p-1 p-2" />;

tests/fixtures/custom-jsx/output.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ const s = tw(Foo)("p-2 sm:p-1");
2222
const t = tw(Foo)(Bar)("p-2 sm:p-1");
2323
const u = no(Foo)("sm:p-1 p-2");
2424
const v = no.tw(Foo)("sm:p-1 p-2");
25+
const w = tw.div(Foo)`p-2 sm:p-1`;
26+
const x = tw(Foo).div`p-2 sm:p-1`;
27+
const y = no.tw(Foo)`sm:p-1 p-2`;
28+
const z = no(Foo).tw`sm:p-1 p-2`;
2529

2630
const A = (props) => <div className={props.sortMe} />;
2731
const B = () => <A sortMe="p-2 sm:p-1" dontSort="sm:p-1 p-2" />;

0 commit comments

Comments
 (0)