https://github.com/deriegle/vscode-test-file-finder
VS Code extension to open test file in split view
https://github.com/deriegle/vscode-test-file-finder
Last synced: about 2 months ago
JSON representation
VS Code extension to open test file in split view
- Host: GitHub
- URL: https://github.com/deriegle/vscode-test-file-finder
- Owner: deriegle
- License: mit
- Created: 2018-10-04T21:18:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T15:16:42.000Z (over 2 years ago)
- Last Synced: 2025-04-06T13:47:22.990Z (about 2 months ago)
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=riegledevin.test-file-finder
- Size: 972 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# test-file-finder README

This extension is useful for quickly finding and opening test files.
The current keybinding is Ctrl + F1 on Windows or Cmd + F1 on Mac, but I am taking suggestions for what would be better.Add the extension via the [VS Code marketplace](https://marketplace.visualstudio.com/items?itemName=riegledevin.test-file-finder), or from the extensions pane in VS Code itself.
## Current configuration:
| Name | Default | Description
| -- | -- | -- |
| `testFinder.showInStatusBar` | `false` | Shows a message on the left side of the status bar to indicate whether it has found the test file or not
| `testFinder.openInSplitView` | `true` | Open test file in split view or current window
| `testFinder.csharpGlob` | `Tests.cs` | Default for C# files (ex: Foo.cs has test file FooTests.cs)
| `testFinder.javascriptGlob` | `-test.js` | Default for JavaScript files (ex: foo.js has test file foo-test.js)
| `testFinder.rubyGlob` | `_spec.rb` | Default for Ruby files (ex: foo.rb has test foo_spec.rb)
| `testFinder.typescriptGlob` | `-test.ts` | Default for Typescript files (ex: MyUtil.ts has test MyUtil-test.ts)
| `testFinder.typescriptreactGlob` | `-test.ts` | Default for TSX files (ex: MyComponent.tsx has test MyComponent-test.ts)## Adding support for new test files
You can add support for new test files by adding your configuration to the `package.json` file like so:```json
"contributes" {
"configuration": {
"title": "Test File Finder Configuration",
"properties": {
"testFinder.Glob": {
"type": "string",
"default": "",
"description": "..."
}
}
}
}
```You also need to update `activationEvents` for the language you're adding so the extension will start when a file for that language is open:
```json
"activationEvents": [
"onLanguage:",
]
```You can find the supported languageId values [here](https://code.visualstudio.com/docs/languages/identifiers).