Skip to content

Implementation render directive function - #29

Open
MRinaldi9 wants to merge 2 commits into
vitest-community:mainfrom
MRinaldi9:feat/render-directive
Open

Implementation render directive function#29
MRinaldi9 wants to merge 2 commits into
vitest-community:mainfrom
MRinaldi9:feat/render-directive

Conversation

@MRinaldi9

Copy link
Copy Markdown
Contributor

Concrete implementation of the issue #28

@pkg-pr-new

pkg-pr-new Bot commented Apr 12, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/vitest-browser-angular@29

commit: 0148e1a

@shairez

shairez commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Thanks @MRinaldi9 !

@yjaaidi WDYT?

@yjaaidi

yjaaidi commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Hi @MRinaldi9, thank you for the contribution. We really value your contribution but I'm sorry for not being in favor of such API 😅

I would instead recommend using render and let users create their own wrapping component.

There are three reasons for this:

  • alignment with other frameworks
  • tests are docs so it's easier to understand a test with an explicit wrapper component.
  • it adds cognitive load and maintenance surface. Users and agents have to understand the options etc... and it's more maintenance for us for future users who will want to control this or that thing (e.g. change detection strategy?

Feel free to document directive testing in the readme though.
What do you think @shairez?

@MRinaldi9

Copy link
Copy Markdown
Contributor Author

@yjaaidi Yeah, seems fair to me and understandable for all the reasons you mentioned. I can add a dedicated section in the README for testing attribute directives or maybe create a new doc file for that purpose. WDYT @shairez / @yjaaidi? I can open a new PR—what do you prefer, @shairez?

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