Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute more specific test names for minitest specs #1609

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Earlopain
Copy link
Contributor

@Earlopain Earlopain commented Mar 13, 2024

Motivation

This will close #1605, do most of what is actually possible for #1604 and adress #1606 (comment)

Implementation

Use the group stack for spec as well. This removes most of the distinction these two previously had.

minitest_spec_halfwritten simulates a user typing new specs. It mostly tests that the group ids being sent to vscode are well formed so something like in #1605 doesn't happen. It shows codelenses for everything which isn't entirely correct, but I think that's better than it shifting around during typing.

I changed the reference marker into something that won't be escaped by shellescape. It needs to happen at the end, and when modified that doesn't work out.

Spec test names will look like this: test_.*_my_test, where .* is the 0001 part. Having the actual numbers there would require keeping track of how many its a describe block has encountered and might also just not be possible if there's something that defines tests outside of it because the numbers would then always be off.

Automated Tests

Added something for the variations I could come up with.

Manual Tests

Tested code lenses for the modified/added expections execute the correct tests.

@Earlopain Earlopain marked this pull request as ready for review March 14, 2024 16:08
@Earlopain Earlopain requested a review from a team as a code owner March 14, 2024 16:08
@vinistock vinistock added enhancement New feature or request server This pull request should be included in the server gem's release notes labels Mar 15, 2024
@egiurleo egiurleo removed their request for review March 25, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Minitest spec code lenses break when describe contains interpolation
2 participants