Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Test/Spec SwitcherNew to Visual Studio Code? Get it now.

Test/Spec Switcher

Fooo

|
185 installs
| (1) | Free
Quickly switch between source code and test/spec files (and vice versa)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Spec Switcher

I work in a codebase that doesn't have a standard way of naming or locating test files. So I wrote this extension which uses fuzzy search and some other clever stuff to try and locate the matching test/source file and quickly switch to it (and vice versa). Ideally we would just have a standard way to organise and name our files, but this was more fun to make.

Features

Use Ctrl+Alt+. (mac: Ctrl+Cmd+.) to switch between source/test code files and their matching test/source files. The extension will do its best to find the matching test/source file in the workspace. It will also remember which file you came from, so using the extension again will take you back.

If you want to manually select the file to switch to (sometimes the extension will get it wrong) use Ctrl+Shift+Alt+. (mac: Ctrl+Shift+Cmd+.).

The commands are also available in the command pallette under Switch to spec/code and Manually switch to spec/code.

Extension Settings

This extension contributes the following settings:

  • spec-switcher.useGitIgnoreFile: enable to exclude gitignored files from matches (enabled by default)
  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2022 Microsoft