diff options
author | 2021-10-06 16:49:26 -0700 | |
---|---|---|
committer | 2021-10-06 16:49:26 -0700 | |
commit | 5370ea71c0b3a6759c481f96608ce855bd043bc8 (patch) | |
tree | cf75dd798d1109fc3d06cfc8621c8aefc8a93183 /integration/snippets/custom-emotion-jsx/file.jsx | |
parent | 0afec7739b9f1df8d9cf565f3fed19e663162734 (diff) | |
download | bun-5370ea71c0b3a6759c481f96608ce855bd043bc8.tar.gz bun-5370ea71c0b3a6759c481f96608ce855bd043bc8.tar.zst bun-5370ea71c0b3a6759c481f96608ce855bd043bc8.zip |
Add support for reading JSX config from tsconfig.json
Diffstat (limited to 'integration/snippets/custom-emotion-jsx/file.jsx')
-rw-r--r-- | integration/snippets/custom-emotion-jsx/file.jsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/integration/snippets/custom-emotion-jsx/file.jsx b/integration/snippets/custom-emotion-jsx/file.jsx new file mode 100644 index 000000000..c00cb0543 --- /dev/null +++ b/integration/snippets/custom-emotion-jsx/file.jsx @@ -0,0 +1,15 @@ +import * as ReactDOM from "react-dom"; +export const Foo = () => <div css={{ content: '"it worked!"' }}></div>; + +export function test() { + const element = document.createElement("div"); + element.id = "custom-emotion-jsx"; + document.body.appendChild(element); + ReactDOM.render(<Foo />, element); + const style = window.getComputedStyle(element.firstChild); + if (!(style["content"] ?? "").includes("it worked!")) { + throw new Error('Expected "it worked!" but received: ' + style["content"]); + } + + return testDone(import.meta.url); +} |