Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>test-utilNew to Visual Studio Code? Get it now.
test-util

test-util

Andre Gomes

|
102 installs
| (1) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

test-util

Test Utils to help in specs

Features

All features can be uysed from the command center (F1 > Find Match)

Create test files with consistent naming in a easy way

Code_uKig0gKZLz

Cycle between your file and the test file

Code_SUkOiKlF8S

Review GitHub PRs always cheking for unit tests

Code_2U7nSfRDSI

Initial Setup

resolves

resolves key is the global configuration, that will apply for all workspaces, and is recommended to be used in the User Settings(settings.json) file

// settings.json
{
  "test-utils": {
    "resolves":  [
      {
        "filePath": "src/**/*.vue",
        "specPath": "test/unit/specs/**/*.spec.js",
      },
      {
        "filePath": "src/**/*.js",
        "specPath": "test/unit/specs/**/*.spec.js",
      },
      {
        "filePath": "app/**/*.rb",
        "specPath": "spec/**/*_spec.rb",
      },
      {
        "filePath": "**/*.go",
        "specPath": "**/*_test.go",
      },
    ]
  }
}

The **/* is a required separator and it DOES NOT indicate a glob pattern.

With a file named src/components/HelloWorld.vue it will be replaced to test/unit/specs/components/HelloWorld.spec.js, and take you to the test file. In this example we will replace src with test/unit/specs in all files with the extension .vue and .js.

localResolves

localResolves key is recommended for a specific project configuration using the Workspace Settings(.vscode/settings.json) file

It takes precedence over the resolves key, but don't override by default (if you want to override declare the resolves key as an empty array)

// .vscode/settings.json
{
  "test-utils": {
    "localResolves":  [
      {
        "filePath": "src/**/*.vue",
        "specPath": "test/unit/**/*.spec.js",
      }
    ]
  }
}

Know Issues

  • This extension is not compatible with multiple workspaces at the same time.

Release Notes

WIP

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