{"action":"created","issue":{"url":"https://api.github.com/repos/jest-community/vscode-jest/issues/324","repository_url":"https://api.github.com/repos/jest-community/vscode-jest","labels_url":"https://api.github.com/repos/jest-community/vscode-jest/issues/324/labels{/name}","comments_url":"https://api.github.com/repos/jest-community/vscode-jest/issues/324/comments","events_url":"https://api.github.com/repos/jest-community/vscode-jest/issues/324/events","html_url":"https://github.com/jest-community/vscode-jest/pull/324","id":322471342,"number":324,"title":"Fix decorators on windows by adjusting implicit jest path based on OS","user":{"login":"ThomasRooney","id":2904857,"avatar_url":"https://avatars2.githubusercontent.com/u/2904857?v=4","gravatar_id":"","url":"https://api.github.com/users/ThomasRooney","html_url":"https://github.com/ThomasRooney","followers_url":"https://api.github.com/users/ThomasRooney/followers","following_url":"https://api.github.com/users/ThomasRooney/following{/other_user}","gists_url":"https://api.github.com/users/ThomasRooney/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasRooney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasRooney/subscriptions","organizations_url":"https://api.github.com/users/ThomasRooney/orgs","repos_url":"https://api.github.com/users/ThomasRooney/repos","events_url":"https://api.github.com/users/ThomasRooney/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasRooney/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-05-12T01:17:05Z","updated_at":"2018-05-21T10:47:06Z","closed_at":"2018-05-12T14:39:04Z","author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/jest-community/vscode-jest/pulls/324","html_url":"https://github.com/jest-community/vscode-jest/pull/324","diff_url":"https://github.com/jest-community/vscode-jest/pull/324.diff","patch_url":"https://github.com/jest-community/vscode-jest/pull/324.patch"},"body":"The green/red dots are currently broken on windows if jest path isn't configured.\r\n\r\nThe jest path selected is always a shell `jest` (linux/mac) script, rather than a feature based on current operating system, and potentially running the `jest.cmd` file. As such it crashes when attempting to run in windows `ENOENT`, because windows cannot evaluate shell scripts. \r\n\r\nThis fixes that.\r\n\r\n * Removed double default configuration in package.json and in pathToJest helper\r\n * Check for OS platform before deciding on which script to run\r\n * Assumes global jest if jest not in node_modules. \r\n\r\nNot tested on Mac/Linux. Please confirm this doesn't regress there if you decide to merge.\r\n\r\nThis closes quite a few bugs that are correlated because the `jest --getConfig` command wasn't working on windows. FYI for a current workaround, just define jest path explicitly.\r\n\r\nCloses #274 #320 #306 #289"},"comment":{"url":"https://api.github.com/repos/jest-community/vscode-jest/issues/comments/390620191","html_url":"https://github.com/jest-community/vscode-jest/pull/324#issuecomment-390620191","issue_url":"https://api.github.com/repos/jest-community/vscode-jest/issues/324","id":390620191,"user":{"login":"stephtr","id":5764184,"avatar_url":"https://avatars1.githubusercontent.com/u/5764184?v=4","gravatar_id":"","url":"https://api.github.com/users/stephtr","html_url":"https://github.com/stephtr","followers_url":"https://api.github.com/users/stephtr/followers","following_url":"https://api.github.com/users/stephtr/following{/other_user}","gists_url":"https://api.github.com/users/stephtr/gists{/gist_id}","starred_url":"https://api.github.com/users/stephtr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephtr/subscriptions","organizations_url":"https://api.github.com/users/stephtr/orgs","repos_url":"https://api.github.com/users/stephtr/repos","events_url":"https://api.github.com/users/stephtr/events{/privacy}","received_events_url":"https://api.github.com/users/stephtr/received_events","type":"User","site_admin":false},"created_at":"2018-05-21T10:47:06Z","updated_at":"2018-05-21T10:47:06Z","author_association":"MEMBER","body":"By starting the commands in a Windows cmd (simply by supplying `{ shell: useShell }`), running `node_modules/.bin/jest` should automatically run `node_modules\\.bin\\jest.cmd` (that's the same as omitting the `.exe` extension of a file when running it). The issue was that the runner itself ran the command in a shell, but not the settings when fetching Jest's configuration after launch."}}
{"actor":{"display_login":"stephtr"}}