Skip to content

Conversation

@MRinaldi9
Copy link

@MRinaldi9 MRinaldi9 commented Nov 26, 2025

#5 Closing this issue

@shairez
Copy link
Contributor

shairez commented Nov 26, 2025

Thanks for the PR @MRinaldi9 !

Added a few comments

@MRinaldi9
Copy link
Author

i had changed the tsconfig because in v4 vitest there is no need to set the types for the providers and i added the globals so the tests have less "imports code".

@shairez
Copy link
Contributor

shairez commented Nov 27, 2025

Thanks for the fixes @MRinaldi9 !

@yjaaidi wanna review before we merge?

@yjaaidi
Copy link

yjaaidi commented Dec 1, 2025

Hi @MRinaldi9, first of all thank you for the contribution.

The thing is that the whole TestBed setup (including zoneful/zoneless setup) is already performed by Angular's unit-test builder and @analog/vitest-angular.

We still have to discuss this with @shairez but I think that we should reduce the surface of this package to providing a render function and avoid overlapping with Angular CLI's and Analog.

What do you think Shai?

@shairez
Copy link
Contributor

shairez commented Dec 2, 2025

Thanks @yjaaidi for the review

The reason I originally added this file was because there was a specific order in which the files it is importing - @angular/compiler and @analogjs/vitest-angular/setup-zone.

You need to load the compiler before the setup-zone, or else it fails.

It took me some time to figure this out so I didn't want others to waste their time on this, so that's why I've added it originally.

I think there is value in providing it as a utility which is required for the vitest browser mode tests to work with the analog vite plugin.

But maybe it's indeed not relevant for angular/cli tests

maybe we prefix it with analog- and give it as an optional setup to analog vite plugin consumers?

what are the downsides you see for keeping it?

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

Successfully merging this pull request may close these issues.

3 participants