Skip to content

Support custom test commands #3838

Description

@clinejj

I have checked that this feature is not already implemented

  • This feature does not exist

Use case

The current LSP attempts to automatically determine the command to run tests using the Test Explorer, however this doesn't work for all scenarios. For example, Rails applications use bin/rails test out of the box.

The current commands generated by the LSP do not work for all codebases, so allowing developers to customize the test command would make the Test Explorer functionality more useful for all codebases.

Description

I would like to be able to customize the command used for the test explorer to run tests, for example bin/rails test

Implementation

In the Code Lens command creation, prefer to read from the extension configuration instead of the base command: https://github.com/Shopify/ruby-lsp/blob/main/lib/ruby_lsp/listeners/code_lens.rb#L210-L225

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpinnedThis issue or pull request is pinned and won't be marked as stale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions