Conversation
|
@timdeschryver what was the thinking here? Does this not have an impact on testing? |
|
@markgoho Angular has a built-in solution to register providers at a global level, which will be provided in each testbed. I prefer using built-in Angular functionality over providing another way in ATL. For one-off components (I don't know if this happens?), it's still possible to add the |
|
oh for sure, native > custom any day! so we're just now getting our big monorepo onto Angular 20, haven't started to use zoneless, and haven't migrated to ATL v18 (also haven't tried vitest), but I think what you're showing here with the Sandbox app is:
and then something like this as the mechanism to include them (may be slightly different for Jest-based testing) "providersFile": "projects/sandbox-app/src/test-providers.ts"so, if the App is zoneless, you do have to make sure that provider exists in all tests, it's just that Angular has a native way to do this, and it won't fall to ATL to expose a way to do it |
|
@markgoho Correct! I think the new
It's either this, or you have to manually add the zoneless option to each test. |
No description provided.