</> ngTestFoundry
v0.1.1 is live

Generate Angular specs and stories locally.

ngTestFoundry is a VS Code extension that creates deterministic first drafts of Angular TestBed specs and CSF3 Storybook stories from component source.

ngTestFoundry generating an Angular TestBed spec in VS Code
Local-only generation for modern Angular components. No component source is sent to a server.

Built for the boring first draft.

The goal is not magic. The goal is a useful, repeatable starting point that developers can review and adapt like normal code.

TestBed specs

Generate `.spec.ts` scaffolds with component imports, shallow providers, required inputs, and basic creation assertions.

Storybook stories

Generate CSF3 `.stories.ts` files with inferred args from component inputs and outputs.

Modern Angular

Best fit for standalone components using `input()`, `model()`, `output()`, `inject()`, `@Input()`, and `@Output()`.

Free for one component. Pro for workflow scale.

Free

Use the core generator on the active Angular component.

  • Generate one spec from the active component.
  • Generate one story from the active component.
  • Local-only static analysis.

Pro

Use ngTestFoundry across larger workspaces and team styles.

  • Batch-generate specs across a workspace.
  • Batch-generate stories across a workspace.
  • Override output with custom Eta templates.

Honest limits.

ngTestFoundry prefers explicit TODOs over silent guessing. Today it is strongest on Angular 17.3+ standalone components.

Current limits:
- Non-standalone NgModule graph resolution is planned.
- Dependency mocks are shallow.
- Vitest output is planned.

See the generated shape first.

Before installing, you can inspect a real example of the generated TestBed spec and Storybook story, including the TODOs ngTestFoundry leaves when static analysis should not guess.

Open example output

Launch write-up

A short explanation of why ngTestFoundry exists, what it supports today, what it generates, and what feedback would help most.