Describe the bug
There is an infinite loop when transforming this file with styled-jsx:
Minimal reproduction
Put
export const Probe = (props) => {
const t = props.theme;
const Icon = t.icon;
return (
<div className="probe">
<Icon />
<style jsx>{`
.probe {
color: ${t.color};
}
`}</style>
</div>
);
};
into packages/styled-jsx/transform/tests/fixture/class/input.js
Then you get
> Should transform class correctly
Error: Test timed out in 5000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
Snapshots 1 obsolete
↳ __tests__/wasm.test.ts
· Should transform class correctly 1
Test Files 1 failed (1)
Tests 1 failed | 2 passed | 78 skipped (81)
Start at 21:57:39
Duration 5.43s (transform 23ms, setup 0ms, collect 44ms, tests 5.23s, environment 0ms, prepare 35ms)
This is on commit a93bcc0
Expected behavior
It should be transformed and not timeout
Additional context
vercel/next.js#97685
Describe the bug
There is an infinite loop when transforming this file with styled-jsx:
Minimal reproduction
Put
into
packages/styled-jsx/transform/tests/fixture/class/input.jsThen you get
This is on commit a93bcc0
Expected behavior
It should be transformed and not timeout
Additional context
vercel/next.js#97685