DEV Community

ss
ss

Posted on

What ngTestFoundry actually generates for an Angular component

My first ngTestFoundry post was a launch note. This one is more concrete: here is the generated shape.

ngTestFoundry is a local-only VS Code extension that generates first drafts of Angular TestBed specs and CSF3 Storybook stories from component source.

Example output:
https://github.com/sshyeri/ng-test-foundry-public/blob/main/EXAMPLES.md

What I am trying to optimize for:

  • required inputs set before detectChanges()
  • signal-style input()/model()/output() support
  • decorator-based @Input() / @Output() support
  • Storybook args and controls inferred from inputs
  • TODOs where static analysis should not guess

The tool is not trying to produce a finished test suite. It is trying to produce the boring first draft so the developer can review and adapt it.

If you work with Angular standalone components, the most useful feedback would be:

  • would this generated TestBed setup compile in your workspace?
  • which component pattern would break it?
  • are the TODOs helpful or noisy?

Marketplace:
https://marketplace.visualstudio.com/items?itemName=sshyeri.ng-test-foundry

Feedback thread:
https://github.com/sshyeri/ng-test-foundry-public/issues/1

Top comments (0)