Jump between a source file and its test file with a single shortcut — works with any language and naming convention.
Default shortcut: Shift+Cmd+T (Mac) / Shift+Ctrl+T (Windows/Linux)
Supported conventions
| From | To |
|---|---|
test_foo.py |
foo.py |
foo_test.py |
foo.py |
TestMyClass.py |
MyClass.py → my_class.py |
MyClassTest.py |
MyClass.py → my_class.py |
foo.test.ts / foo.spec.ts |
foo.ts |
foo.py |
first match: test_foo.py → foo_test.py → foo.test.py → foo.spec.py → TestFoo.py → FooTest.py |
MyClass.py |
TestMyClass.py → MyClassTest.py |
my_class.py |
test_my_class.py → … → TestMyClass.py → MyClassTest.py |
Works with any file extension (.py, .ts, .js, .kt, .java, …).
How it works
The extension uses VS Code's built-in workspace file index (workspace.findFiles) — no shell processes, no terminal, instant navigation.
When jumping from a source file, candidates are tried in order and the first match wins. When jumping from a test file, the convention is detected from the filename automatically.