Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>ngTestFoundryNew to Visual Studio Code? Get it now.
ngTestFoundry

ngTestFoundry

sshyeri

|
1 install
| (0) | Free Trial
Deterministically generate Angular TestBed specs and Storybook stories from component source.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ngTestFoundry

Deterministic Angular spec and Storybook scaffold generation for VS Code and Cursor.

ngTestFoundry statically analyzes Angular component source with ts-morph and generates local-only TestBed specs and CSF3 Storybook stories. No component code is sent to a server.

Demo GIF placeholder: record Generate Spec on a component with constructor DI and signal inputs.

Features

Free:

  • Generate one .spec.ts for the active Angular component.
  • Generate one .stories.ts for the active Angular component.
  • Parse constructor DI, inject(), @Input, signal input() / model(), @Output, output(), providers, host directives, class generics, and public method stubs.
  • Warn instead of guessing for uncertain constructs.

Pro-ready code paths:

  • Batch workspace generation for specs and stories.
  • Custom template override via .ng-test-foundry/templates/spec.eta and .ng-test-foundry/templates/story.eta.
  • Lemon Squeezy license activation, validation, deactivation, and 14 day offline grace.

Commands

  • ngTestFoundry: Generate Spec
  • ngTestFoundry: Generate Story
  • ngTestFoundry: Generate Specs for Workspace
  • ngTestFoundry: Generate Stories for Workspace
  • ngTestFoundry: Activate License
  • ngTestFoundry: Deactivate License

CLI Helpers

pnpm install
pnpm parse "<glob-or-path>"
pnpm generate both "<component-path>" --write

parse prints one JSON object per @Component, followed by a summary line. generate is a development helper for exercising the same parser/generators outside VS Code.

Custom Templates

Create:

.ng-test-foundry/templates/spec.eta
.ng-test-foundry/templates/story.eta

Template data:

  • it.model: parsed ComponentModel
  • it.framework: jasmine, jest, or unknown
  • it.builtIn: ngTestFoundry built-in generated output

You can also point ngTestFoundry.templatesDir at another workspace-relative folder.

Development

pnpm typecheck
pnpm test
pnpm build
pnpm package

The extension bundle is emitted to dist/extension.js.

Current Limits

  • Non-standalone components get a TODO because NgModule graph resolution is not implemented yet.
  • Dependency mocks are shallow; method inference from provider classes is still TODO.
  • Vitest output is not implemented.
  • License activation code is wired, but real Lemon Squeezy product validation needs owner account details before release.

FAQ

Does my code leave my machine?
No. Parsing and generation are local. License commands contact Lemon Squeezy only for activation, validation, or deactivation.

Why are there TODO comments in generated files?
ngTestFoundry prefers explicit TODOs over pretending uncertain static analysis is complete. Warnings are also summarized in VS Code notifications and batch output.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft