With this extension, you will be able to go to the test file (or create it) for the current file with the press of a hotkey. Also, go to the source file using the same hotkey.
Available several common test file location strategies. Is recommended to save the test file location strategy in the workspace settings so that it can be shared with your team.
Strategy name | File Paths | Go to Test | Go To Source |
---|---|---|---|
same_directory |
src/feature/file.ts src/feature/file.test.ts |
✔ | ✔ |
__tests__ |
src/feature/file.ts src/feature/__tests__/file.ts |
✔ | ✔ |
maven |
src/feature/file.java test/feature/fileTest.java |
✔ | ✔ |
maven-like |
src/feature/file.ts test/feature/file.test.ts |
✔ | ✔ |
custom |
configurable by regex |
✔ | ✘ |
When the test file is not found it will create one
- Go to test
- Go to source *
- Creates a test when it doesn't exist
- Custom test location strategy
*: except for custom strategy.
- Change suffix (e.g.
.test.
to.spec.
) - Confirm on Create file
Check backlog for more information