Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Go To Unit TestNew to Visual Studio Code? Get it now.
Go To Unit Test

Go To Unit Test

Stanislas Duprey

|
197 installs
| (0) | Free
Link a function name to the existing unit test function is it exists. The only requirement is that the test file has the .test.ts extension and contains `describe(functionName)`
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

go-to-unit-test README

Features

  • Show the functions that are covered by unit tests by highlighting the function in the source code with a green background

sample

  • Jump to the source code. Have the cursor on the function name and open the command palette and search for "go to unit test", alternatively assign a keybord shortcut to this command

Requirements

In a ts project, your test files must have the extension .test.ts and be inside the same folder as the implementation or a parent folder.

The test file must contain describe('nameOfTheFunction') in order to be recognized as the test for the function

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