Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>SwitchIt: Your Code & Test File NavigatorNew to Visual Studio Code? Get it now.
SwitchIt: Your Code & Test File Navigator

SwitchIt: Your Code & Test File Navigator

Meenakshi Chauhan

|
20 installs
| (0) | Free
Easily navigate between your code and test files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SwitchIt: Your Code & Test File Navigator

SwitchIt is a Visual Studio Code extension designed to streamline navigation between your test and implementation files. This tool helps you maintain proper test coverage by seamlessly switching between the two and prompting you when a test or implementation file is missing.

Features

  • Quick Switch
    Move effortlessly between your test files and implementation files with a simple command.

  • Missing File Detection
    If the test file or implementation file doesn’t exist, SwitchIt prompts you to create one.

  • Customizable File Conventions
    Adapt the extension to your project by configuring your file naming conventions. Whether you're working with .test.ts, .spec.ts, or any other format, SwitchIt has you covered.

Default Configuration

By default, SwitchIt uses the following file conventions for navigation:

  • Test File: .spec.ts
  • Implementation File: .ts

You can modify these to fit your project needs.

Configuring the Extension

  1. Open Settings:
    Go to Preferences > Settings (UI) in Visual Studio Code.

  2. Find Settings:
    Search for fileNamingConvention in the settings menu.

  3. Set Your Naming Conventions:
    Change the configuration to match your project structure. For example:

    • Set testFile for your preferred test file pattern (e.g., .test.ts).
    • Set implementationFile for your implementation file format (e.g., .js or .ts).

Usage

  1. Open either a test or implementation file.
  2. Use the "Switch" command via the command palette (Ctrl+Shift+P) or by setting a custom keyboard shortcut.
  3. If the target file is missing, you'll be prompted to create it!

Requirements

  • Visual Studio Code version 1.60.0 or higher.

Contribution

Contributions are welcome! Feel free to submit issues or pull requests to improve this extension.

License

This extension is licensed under the [MIT License]


Happy Coding!
Now, go forth and let your code and tests stay in sync like never before! 🚀

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