Replies: 10 comments 3 replies
-
Just for continuity, a while back I posted #481 where I was trying to get this working with Karma + karma-typescript (instead of karma-webpack) but never really got anywhere. I always worry that my setup is "wrong" in some way; if anybody could link me to an "ejected" (webpack config, not |
Beta Was this translation helpful? Give feedback.
-
Update: I made a branch that uses Angular 12 and Spectator 7 with no other changes. The tests pass in this version, just to show that this is a regression. |
Beta Was this translation helpful? Give feedback.
-
Since we haven't touched this area for a long time, I don't believe it is related to the library. |
Beta Was this translation helpful? Give feedback.
-
Hi @NetanelBasal , the problem is that if I go to Angular and say "this is a regression with v13", I expect them to tell me that they don't know anything about Spectator and don't support it. Are you positive that you weren't using any non-public APIs that they might have changed? If it's not related to Spectator, what else could it be? Like I said, my main concern is that I'm not confident that my project setup is "correct", and that I've had trouble in the past trying to debug how Spectator works. Did you have a chance to check out my repro branches? Is the test runner set up the way you'd expect? Alternately, do you maybe have a project using Spectator with AngularCompilerPlugin that you could point me to, and I could try to reproduce the issue using their setup? I just want some kind of path forward here. |
Beta Was this translation helpful? Give feedback.
-
I don't know. It seems like you are the only one who encountered this error. Let's wait and see if there are more like you. I'll try to check your repo when I can. |
Beta Was this translation helpful? Give feedback.
-
Hi @thw0rted, I'm a bit confused by your project setup - it doesn't seem to list Out of curiosity, can I ask why you're trying to avoid |
Beta Was this translation helpful? Give feedback.
-
Sorry for the confusion! The Angular 13 ( I appear to have installed those packages without saving them to package.json while initially creating the repro, then subsequent I'm avoiding |
Beta Was this translation helpful? Give feedback.
-
Fair enough... I got curious about this stuff after reading your post and ended up bumping into you in other issue threads actually such as angular/angular#44026 😄 I'm still playing around with your demo but it smells to me like yet another upstream issue caused by the frustratingly opaque breaking changes that A13 introduced... There are a lot of steps in my own (not that niche) workflows that have been quite disrupted by the new compilation patterns. Will let you know on the off chance that I have any bright ideas! |
Beta Was this translation helpful? Give feedback.
-
Btw - I did spend quite a lot of time playing with this and didn't manage to get Spectator fully working - however I made some headway with the vanilla testing utils by setting
I think this eliminates the need for this workaround:
To investigate Spectator I copied the source from |
Beta Was this translation helpful? Give feedback.
-
I had the same error - I had errors binding to The reason you're getting this error is that the library (
For background on partial Ivy format. The first article give you some symbols to look for in the library, which you can use to confirm that the library hasn't been "linked". If you're not using @angular/cli for building, and you're using webpack, you'll need to make sure the linker is run during packaging, as described in Consuming partial-Ivy code outside the Angular CLI. Your issue is definitely not related to spectator, it's related to the new angular library package format, which now specifies partial Ivy format for libraries. It's new in ng13 that all the angular libraries are partial Ivy. |
Beta Was this translation helpful? Give feedback.
-
Is this a regression?
Yes
Description
I use
createHostFactory
to create hosts for testing a component that implementsControlValueAccessor
. In the previous release (Spectator 7.2 / Angular 12) this worked fine, but after upgrading everything, an error is logged at runtime and bindings are not actually made so the tests all fail.Please provide a link to a minimal reproduction of the bug
https://github.com/thw0rted/issue-examples/tree/spectator-cva
Please provide the exception or error you saw
Please provide the environment you discovered this bug in
Anything else?
The linked repro shows that binding to
formControl
works in the consuming application but the host component binding fails. I don't know enough about troubleshooting the library to pinpoint a root cause; if you can help me understand why it's failing I would be willing to try to fix it myself.Do you want to create a pull request?
No
Beta Was this translation helpful? Give feedback.
All reactions