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

FEATURE REQUEST | Support for @swc/jest #43

Open
justLuiz opened this issue Jan 13, 2022 · 6 comments
Open

FEATURE REQUEST | Support for @swc/jest #43

justLuiz opened this issue Jan 13, 2022 · 6 comments

Comments

@justLuiz
Copy link

Hello guys.

first, thanks for this wonderful tool.

are you planning to add support for @swc/jest?

https://swc.rs/docs/usage/jest

https://github.com/swc-project/jest

@uittorio
Copy link
Member

uittorio commented Jan 15, 2022

Hi @justLuiz ! Sorry for the late reply! I will have a look! I am a bit busy with family!

@uittorio
Copy link
Member

Hey! So swc is a rust based compiler. Our plugin act on the compiler that it is in Javascript. In order to have the same kind of feature you could check what babel can do because I read that swc supports babel plugins. If you want to just use typescript and non babel unfortunately it will not work.

@justLuiz
Copy link
Author

hey @uittorio thanks for reply...

yes, swc supports plugins, I don't know if the use of plugins is the same as in babel, anyway.

https://github.com/Typescript-TDD/ts-auto-mock is the best place for this discussion?

@uittorio
Copy link
Member

Myself and @Pmyl are the best people to ask questions. Ts auto mock is a better place but I am afraid you may not get a better answer. The problem is that swc does not use the typescript compiler or ast. Ts auto mock needs typescript itself not just the syntax language. I have the feeling that we may have to create a plugin specifically for swc. Feel free to start something, I am more than happy to contribute, I just dont have the time

@justLuiz
Copy link
Author

no problem, i'll dig deep to understand better, and try to start something. thanks again.

@Pmyl
Copy link

Pmyl commented Jan 17, 2022

I would be happy to practice some Rust :) as long as the data available during compilation is comparable I'm sure it can be done

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

No branches or pull requests

3 participants