jest-community / vscode-jest

The optimal flow for Jest based testing in VS Code
MIT License
2.85k stars 295 forks source link

Add an option to remove bullets near tests #257

Open kachkaev opened 6 years ago

kachkaev commented 6 years ago

Environment

  1. node -v: 9.5
  2. npm -v: latest yarn
  3. ~npm ls react-scripts (if you haven’t ejected): [fill]~
  4. Operating system: macOS High Sierra

Steps to Reproduce

Hi again guys. I switched to VSCode just recently and am very happy to find your extension! Can easily imagine using it nearly every day in future!

I understand the value of showing green, red or empty bullets next to it("...", func) – that's a nice contextual feedback. However, I guess I just stumbled across a case when it'd be great to turn these marks off and would like to know if that's possible. Check out this example:

screen shot 2018-02-09 at 15 52 50

As you've probably already guessed, the test is marked as skipped because its name is dynamic, so there's no way of knowing its actual state. I've got quite a few of such tests and it feels natural to disable the bullets. I haven't found a config variable to do so, but if it's just a lack of my attention, sorry for the buzz!

Perhaps, an even more sophisticated strategy could be applied in such cases?

orta commented 6 years ago

IMO, I think we should just remove all dots on dynamically named it/tests.

I think that work would need to happen inside jest-editor-support - https://github.com/facebook/jest/tree/master/packages/jest-editor-support

Basically extending this to check whether the AST inside the ( and ) is just a single string

kachkaev commented 6 years ago

Yeah, that'd be useful. Despite that, an option to remove all dots would be a useful thing too. It may be something to do with my perception, but I can't get used to them and am unconsciously trying to delete them from time to time 😃

orta commented 6 years ago

Sure, makes sense, happy to take an PR adding that option too

MichalLytek commented 6 years ago

Would be possible to move the bullets to the side, where breakpoints are placed? Just like in wallaby,js or mocha-sidebar:

wallaby

kachkaev commented 6 years ago

@19majkel94 this array of marks looks much easier to glance through!

seanpoulter commented 6 years ago

It's possible, and it's a medium-sized PR if you'd like to give it a shot.

kachkaev commented 6 years ago

@19majkel94 would you like to give it a go? I've got only one week of experience in VSCode, need to mature a bit first 😅

MichalLytek commented 6 years ago

@kachkaev I've never done anything related to VSCode extensions 😞 I may try but now not, I have some work to do in my open source project.