Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>NgTestThisFileNew to Visual Studio Code? Get it now.
NgTestThisFile

NgTestThisFile

omarfarukpial

|
9 installs
| (0) | Free
This is a test runner extension for a single file in Angular, just open the spec file then press ctrl+alt+t.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🔥 NgTestThisFile

NgTestThisFile is a lightweight, blazing-fast Visual Studio Code extension that helps Angular developers run individual spec files effortlessly with a single command or shortcut.

⚡ Made with ❤️ by Omar Faruk Pial


✨ Features

  • ✅ One-click testing: Run ng test for the currently open .spec.ts file instantly.
  • 🎯 Smart detection: Automatically detects the relative path for Angular CLI's --include option.
  • 🔄 Auto-terminal handling: Opens a dedicated terminal, clears previous runs, and runs the new command.
  • ⌨️ Keyboard shortcut ready: Default shortcut Ctrl + Alt + T.
  • 💻 Cross-platform: Works seamlessly on Windows, macOS, and Linux.

🎯 Why Use This?

When working with Angular apps, testing individual files is common—but the Angular CLI doesn’t offer a native way to run one test file easily.
NgTestThisFile solves that by:

  • Avoiding full test suite execution
  • Boosting test–debug productivity
  • Simplifying workflows

Ideal for Test-Driven Development (TDD) and large Angular projects!


🚀 Usage

  1. Open any Angular test file (e.g., example.component.spec.ts)
  2. Press Ctrl + Alt + T (or use the Command Palette: “Ng Test This File”)
  3. The extension runs:
ng test --include='src/app/example/example.component.spec.ts'
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft