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

Test fail when using vitest, Angular 18 and @jscutlery/swc-angular v0.17.0 #680

Open
jahusa02 opened this issue Nov 29, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@jahusa02
Copy link

Hey!

I have a Stepper Component extending the CDKStepper. In it's Provider Array it has something like:

providers: [{provide: CDKStepper, useExisting: CustomStepper}]

Also We have a Custom Step Component having the same but CdkStep and CustomStep

In our tests we use a test Component that is using the Custom Stepper and Steps.

With version < 0.17.0, the CDKStepper gets its Constructor Arguments e.g. ChangeDetectorRef, but in version 0.17.0 it doesn't

The Error:
TypeError: Cannot read properties of undefined (reading '_stateChanged')
It's properly this line

Can't create a example repo for now.
Just let me now if you need more infos

Thanks!

@pumano
Copy link
Contributor

pumano commented Nov 30, 2024

@jahusa02 Hi, did you update @swc/core to latest too? If it not help, need detailed reproduction for component and tests.

Also which version of angular you use?

@jahusa02
Copy link
Author

Angular 18 and yes, updated swc to latest version (1.9.X)

Hope I find time for it this weekend. It's the only test that fails in 4k Unit Tests. Kinda weird

@jahusa02
Copy link
Author

jahusa02 commented Dec 1, 2024

#376

This issue is related I guess 🤔 weird that older versions seem to be affected but in another way

@pumano
Copy link
Contributor

pumano commented Dec 1, 2024

@jahusa02 OK try to dig to it soon, to check why that happens, because transpiled code works properly, but original code has problems.

@edbzn edbzn added the bug Something isn't working label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants