Skip to content
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

[Bug]: Unable to get Lit + Jest + Typescript + SWC Jest to work properly #14955

Closed
gethari opened this issue Mar 12, 2024 · 4 comments
Closed

Comments

@gethari
Copy link

gethari commented Mar 12, 2024

Version

29.7.0

Steps to reproduce

I am trying to use @swc/jest to speed up my tests on my lit+typescript+jest setup. When using the swc/jest as the test runner the willUpdate method is not getting executed. From what I see/find the call stack is different when using ts-jest & it works fine, but on using swc/jest the callstack is missing the _callSuper().

I am attaching a simple repository that can reproduce the issue. Btw here's some screenshots that shows the above, if it is helpful

swc

image

ts-jest

image

Expected behavior

swc/jest should not break existing tests & should call lit component lifecycle's willUpdate() method

Actual behavior

willUpdate() method is not getting executed.

Additional context

Not sure if this issue is specific to jest or lit or swc , I have filed the same issue on other repositories as well

Environment

Operating System:
Platform: linux
Arch: x64
Machine Type: x86_64
Version: #19~22.04.1-Ubuntu SMP Wed Jan 10 22:57:03 UTC 2024
CPU: (2 cores)
Models: AMD EPYC 7763 64-Core Processor

Binaries:
Node: 20.11.1
npm: 10.2.4
Yarn: 1.22.19
pnpm: 8.15.4

Relevant Packages:
jest : 29.7.0
@mrazauskas
Copy link
Contributor

Jest only executes code provided by a transformer. Hence, if all works fine with ts-jest, most likely this is not an issue on Jest's side.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Apr 13, 2024
Copy link

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2024
Copy link

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants