-
Notifications
You must be signed in to change notification settings - Fork 2
Ported inputs ability
#8
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
base: main
Are you sure you want to change the base?
Conversation
yjaaidi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks for this.
Mostly nitpick that we can fix pre or post-merge.
| @@ -1,10 +1,13 @@ | |||
| import { getTestBed } from "@angular/core/testing"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not replace this whole file with a call to Analog's setupTestBed?
It has all the typical setup to work with or without isolation etc...
https://github.com/analogjs/analog/blob/0b255202253a418f88717c6e178f0bb179725e3c/packages/vitest-angular/setup-testbed.ts#L22?
| import { TestBed } from "@angular/core/testing"; | ||
| import { beforeEach } from "vitest"; | ||
|
|
||
| setupAngularTestEnvironment(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| export default defineConfig({ | ||
| plugins: [ | ||
| angular({ tsconfig: './tsconfig.json' }) as unknown as PluginOption, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't try this locally but this as unknown as PluginOption seems to be related to multiple vite versions incompatibility. Can't we fix that instead?
This implementation has been ported from https://github.com/yjaaidi/vitest-browser-angular to enable inputs passing on render.
CREDIT: @yjaaidi