A lightweight VS Code extension that lets you run individual Angular unit tests directly from the editor. Get real-time test results, failure summaries, and debugging insights — all without leaving VS Code.
Features
Run a single Angular/Jasmine test with one click
View test results inside the VS Code Test Explorer
Pass/Fail summary with counts
Detailed failure messages for quick debugging
Automatically detects nearest it() or describe() under cursor
Works with Angular CLI projects using Karma + Jasmine
Requirements
Your Angular project must be using:
Angular CLI (@angular/cli)
Jasmine/Karma test environment (default Angular testing setup)
Standard ng test command
If you use a custom runner, additional config may be needed.
Extension Settings
This extension contributes the following settings:
Setting
Description
angularUnitTestHelper.autoReveal
Automatically reveal the Test Result view after running a test.
angularUnitTestHelper.debugMode
Enables verbose logging in the output panel.
How It Works
Place your cursor on an it() or describe() block
Run the command:
The extension internally executes:
Results appear in the Test Results tab:
Pass/Fail indicator
Summary (total passed/failed)
Failure details
Error stack trace
Known Issues
Custom test runners not supporting --testNamePattern may require custom setup
Very large test files may take slightly longer to detect test blocks
Angular versions below v12 are not officially supported