New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lit + Jest + Typescript + SWC Jest #4580
Comments
Are you using |
@augustjk thanks for responding,
Yes This is my tsconfig.json , it has both the properties mentioned in the I am not sure about the actual cause of the issue as I'm trying to use 3 different things together, that nobody before have seem to done ( so far from my search). Hence why raised issue for help across all 3 repo. |
My suspicion is that swc's decorator config is the standard decorator proposal implementation, not TypeScript's experimental decorator, which might be this https://swc.rs/docs/configuration/compilation#jsctransformlegacydecorator |
@augustjk you are right, by making the below config changes to
But when I make the below props to false, the "legacyDecorator": true,
"decoratorMetadata": true, |
I also found these, I think might be related
my
|
I don't know about Stencil but we don't require |
Which package(s) are affected?
Lit Core (lit / lit-html / lit-element / reactive-element)
Description
I am trying to use @swc/jest to speed up my tests on my
lit+typescript+jest
setup. When using theswc/jest
as the test runner thewillUpdate
method is not getting executed. From what I see/find the call stack is different when usingts-jest
& it works fine, but on usingswc/jest
the callstack is missing the_callSuper()
.I am attaching a simple repository that can reproduce the issue. Additionally, I've included screenshots comparing the behavior with swc and ts-jest for your reference.
swc
ts-jest
Reproduction
Please check the readme in this repository for detailed repro steps.
https://github.com/gethari/typescript-webpack-lit-html-jest-swc
Workaround
I have not found a workaround
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
3.1.2
Browser/OS/Node environment
Browser: Chrome 103.0.5060.53
OS: Windows 11
Node version: 20.11.1
npm version: 10.2.4
The text was updated successfully, but these errors were encountered: