{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/vscode-extension-vscode/issues/94","repository_url":"https://api.github.com/repos/Microsoft/vscode-extension-vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode-extension-vscode/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode-extension-vscode/issues/94/comments","events_url":"https://api.github.com/repos/Microsoft/vscode-extension-vscode/issues/94/events","html_url":"https://github.com/Microsoft/vscode-extension-vscode/issues/94","id":301994588,"number":94,"title":"test script only checks for `.vscode-test` folder but not actual Code executable","user":{"login":"DanTup","id":1078012,"avatar_url":"https://avatars2.githubusercontent.com/u/1078012?v=4","gravatar_id":"","url":"https://api.github.com/users/DanTup","html_url":"https://github.com/DanTup","followers_url":"https://api.github.com/users/DanTup/followers","following_url":"https://api.github.com/users/DanTup/following{/other_user}","gists_url":"https://api.github.com/users/DanTup/gists{/gist_id}","starred_url":"https://api.github.com/users/DanTup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanTup/subscriptions","organizations_url":"https://api.github.com/users/DanTup/orgs","repos_url":"https://api.github.com/users/DanTup/repos","events_url":"https://api.github.com/users/DanTup/events{/privacy}","received_events_url":"https://api.github.com/users/DanTup/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-03T12:30:31Z","updated_at":"2018-03-06T11:31:29Z","closed_at":"2018-03-06T11:31:29Z","author_association":"CONTRIBUTOR","body":"In the test script, the check for whether to download Code is just based on the folder existing:\r\n\r\n```js\r\nvar testRunFolder = '.vscode-test';\r\nvar testRunFolderAbsolute = path.join(process.cwd(), testRunFolder);\r\n\r\n/// ...\r\n\r\nfs.exists(testRunFolderAbsolute, function (exists) {\r\n\tif (exists) {\r\n\t\trunTests();\r\n\t} else {\r\n\t\tdownloadExecutableAndRunTests();\r\n\t}\r\n});\r\n```\r\n\r\nThis means that if you want to run your tests against both stable and insiders you can't. eg. I have a wrapper that spawns the test script after setting env vars like this:\r\n\r\n```\r\nrunTests(\"flutter\");\r\nrunTests(\"flutter\", \"insiders\");\r\n```\r\n\r\nThe insiders run fails, because the first run downloads stable into `.vscode-test` and then the insider run assumes the insiders executable is in there.\r\n\r\nI think the fix may relatively simple, moving the `var executable` decleration up outside of the `runTests` function and then change the exists to use that instead of the folder."}}
{"actor":{"display_login":"bpasero"}}