Skip to content

Visual Studio Code Extension that: Toggle between test and file with different strategies

License

Notifications You must be signed in to change notification settings

danyg/go-to-test

Repository files navigation

Go To Test

Go To Test CI

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.

Go To Test

Create test file

Available file location strategies

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

Features

  • Go to test
  • Go to source *
  • Creates a test when it doesn't exist
  • Custom test location strategy

*: except for custom strategy.

Coming soon™ features

  • Change suffix (e.g. .test. to .spec.)
  • Confirm on Create file

Check backlog for more information

About

Visual Studio Code Extension that: Toggle between test and file with different strategies

Resources

License

Stars

Watchers

Forks

Packages

No packages published