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

gutter icons are missing vscode 1.14.2 #130

Closed
orenmizr opened this issue Jul 26, 2017 · 20 comments
Closed

gutter icons are missing vscode 1.14.2 #130

orenmizr opened this issue Jul 26, 2017 · 20 comments

Comments

@orenmizr
Copy link

orenmizr commented Jul 26, 2017

Environment

  1. node -v: 6.9.1

  2. npm -v: 3+

  3. Operating system: windows 10

Steps to Reproduce

install extension
run - npm test or setup lanuch.json or "start jest runner"

Expected Behavior

lines of code tested are marked with green icons at left side gutter if they pass. red if they fail

Actual Behavior

no icons at the gutter. only status below in the bottom of the window. that says pass/fail


all setting seem to be true

@orenmizr orenmizr changed the title gutter icons are missing vscode 1.14 gutter icons are missing vscode 1.14.2 Jul 26, 2017
@orenmizr
Copy link
Author

orenmizr commented Aug 2, 2017

i am using typescript with jest pre-processor - is that supported @orta ?

@orta
Copy link
Member

orta commented Aug 3, 2017

TS + Jest is my setup everywhere 👍.

I'd recommend looking at the regex to register whether a file should be considered a test file somewhere

@orenmizr
Copy link
Author

orenmizr commented Aug 3, 2017

hi, my test are running perfectly and reflected in the bottom even when they break. it is just the gutter icons that don't show up. everything else is working as expected.

@eXigentCoder
Copy link

eXigentCoder commented Aug 10, 2017

Just installed 1.14.2 of VS Code and installed the extension and I'm getting the same issue. This was a clean install as I'm thinking of switching across from Webstorm.
Tests running fine in the output but no gutter icons.
gutter-icons

@bookman25
Copy link
Collaborator

Does anyone have a sample repo we can look at? My guess is that it has something to do with the jest config being used.

@orenmizr
Copy link
Author

regular setup... just pointed to jest to the files. not even sure if there is a dedicated jest file other than package json scripts

@chriskrycho
Copy link

chriskrycho commented Sep 27, 2017

I'm seeing this in the repo here. macOS 10.13, Node v7.8.0.

@Jipperism
Copy link

Same here, it seems to be running all tests correctly. However, I am not receiving the gutters icons (green and red circles) and InlineErrorMessages do not seem to be inserted into the file, as is shown in the gif on the front page. macOS 10.12, Node 8.1.2, Jest 21.1.0, Typescript 2.5.2.

@goncharov
Copy link
Contributor

Same for me since updating to Jest 21. I think it's caused by changed output of --showConfig in jestjs/jest#4078

@Jipperism
Copy link

Jipperism commented Oct 2, 2017

Downgrading to Jest v20 and upgrading to v21 again somehow fixed this for me in our monorepo setup.

@orta
Copy link
Member

orta commented Oct 2, 2017

There was an update last night to the extension which should help this ( #146 )

@orta
Copy link
Member

orta commented Oct 4, 2017

Calling this fixed

@orta orta closed this as completed Oct 4, 2017
@Jipperism
Copy link

Just stopped working for me agian. Errors are showing up in 'Problems' panel, Jest is running al tests as expected AFAICT. Inline error messages in comments and gutter icons are not showing up however. Could this have to do with yesterdays update of VS Code?

@tonivj5
Copy link

tonivj5 commented Nov 11, 2017

I have the same problem, in one project it's working well but in another one not 😕

@webbdylan
Copy link

I was having this issue as well. Through trial and error I was able to determine that for me the missing icons seemed to be due to me disabling the Jest extension. Once I re-eneabled the Jest extension (the one maintained by Orta Therox , Sean Poulter , Vincent Voyer & ConnectDotz ), the icons came back.

@phoenixeliot
Copy link

phoenixeliot commented Dec 13, 2021

I have a repo that consistently reproduces this problem for just one file, but not another: phoenixeliot/line-puzzle@fa953e9

The icons don't appear in Board.test.ts, but do appear in Area.test.ts. The tests in Board.test.ts do get red underlines for the lines that are related to test failures, though, so the tests are running.

EDIT: Bah, this isn't reproing if I clone my own repo into a new folder. I'm going to see if I can find any state data from VS Code or something.

EDIT2: When I restart VS Code, the correct behavior comes back briefly but goes away as soon as the tests finish running. I see the green play button icons, but no spinning icons or result icons.

@phoenixeliot
Copy link

Screen Shot 2021-12-12 at 21 58 52

Screen Shot 2021-12-12 at 21 59 10

@phoenixeliot
Copy link

Is there somewhere I can get debug logs or something for this? I turned on "debug mode" in the Jest extension settings, but that didn't add any extra logs I could find.

This problem occurs regardless of any settings I have turned on or off in my VS Code settings.

@phoenixeliot
Copy link

OK, I think I've narrowed it down.

This was probably introduced when I git mv'd a board.test.ts to Board.test.ts. This confused VS Code, resulting in this JSON in the SQLite database for VSCode's state:

memento/workbench.parts.editor
{
  "editorpart.state": {
    "serializedGrid": {
      "root": {
        "type": "branch",
        "data": [
          {
            "type": "leaf",
            "data": {
              "id": 3,
              "editors": [
                {
                  "id": "workbench.editors.files.fileEditorInput",
                  "value": "{\"resourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/board.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/src/board.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/board.ts\",\"scheme\":\"file\"},\"preferredResourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/Board.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/src/Board.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/Board.ts\",\"scheme\":\"file\"},\"encoding\":\"utf8\"}"
                },
                {
                  "id": "workbench.editors.files.fileEditorInput",
                  "value": "{\"resourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/Area.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/src/Area.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/Area.ts\",\"scheme\":\"file\"},\"encoding\":\"utf8\"}"
                },
                {
                  "id": "workbench.editors.files.fileEditorInput",
                  "value": "{\"resourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/Cell.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/src/Cell.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/src/Cell.ts\",\"scheme\":\"file\"},\"encoding\":\"utf8\"}"
                },
                {
                  "id": "workbench.editors.files.fileEditorInput",
                  "value": "{\"resourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/tests/board.test.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/tests/board.test.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/tests/board.test.ts\",\"scheme\":\"file\"},\"preferredResourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/tests/Board.test.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/tests/Board.test.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/tests/Board.test.ts\",\"scheme\":\"file\"},\"encoding\":\"utf8\"}"
                },
                {
                  "id": "workbench.editors.files.fileEditorInput",
                  "value": "{\"resourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/tests/Area.test.ts\",\"external\":\"file:///Users/phoenix/Code/_personal_projects/line-puzzle/tests/Area.test.ts\",\"path\":\"/Users/phoenix/Code/_personal_projects/line-puzzle/tests/Area.test.ts\",\"scheme\":\"file\"},\"encoding\":\"utf8\"}"
                },
                {
                  "id": "workbench.input.settings2",
                  "value": ""
                },
                {
                  "id": "workbench.editors.files.fileEditorInput",
                  "value": "{\"resourceJSON\":{\"$mid\":1,\"fsPath\":\"/Users/phoenix/Library/Application Support/Code/User/settings.json\",\"external\":\"vscode-userdata:/Users/phoenix/Library/Application%20Support/Code/User/settings.json\",\"path\":\"/Users/phoenix/Library/Application Support/Code/User/settings.json\",\"scheme\":\"vscode-userdata\"},\"encoding\":\"utf8\"}"
                }
              ],
              "mru": [
                3,
                6,
                5,
                4,
                0,
                1,
                2
              ]
            },
            "size": 965
          }
        ],
        "size": 609
      },
      "orientation": 1,
      "width": 965,
      "height": 609
    },
    "activeGroup": 3,
    "mostRecentActiveGroups": [
      3
    ]
  }
}

Note in particular that two of the editors have both a "resourceJSON" key and a "preferredResourceJSON" key, with the first one having the old lowercase filename.

When I replicate this same pattern to Area.test.ts, I get the exact same symptoms. It seems some part of the Jest extension is doing a case-sensitive filename check based on the resourceJSON filename, while other parts aren't.

@phoenixeliot
Copy link

This was involved enough that I made a new ticket: #810

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants