{"action":"created","issue":{"url":"https://api.github.com/repos/google/traceur-compiler/issues/1956","labels_url":"https://api.github.com/repos/google/traceur-compiler/issues/1956/labels{/name}","comments_url":"https://api.github.com/repos/google/traceur-compiler/issues/1956/comments","events_url":"https://api.github.com/repos/google/traceur-compiler/issues/1956/events","html_url":"https://github.com/google/traceur-compiler/issues/1956","id":86788188,"number":1956,"title":"global test case variables in feature tests","user":{"login":"johnjbarton","id":205570,"avatar_url":"https://avatars.githubusercontent.com/u/205570?v=3","gravatar_id":"","url":"https://api.github.com/users/johnjbarton","html_url":"https://github.com/johnjbarton","followers_url":"https://api.github.com/users/johnjbarton/followers","following_url":"https://api.github.com/users/johnjbarton/following{/other_user}","gists_url":"https://api.github.com/users/johnjbarton/gists{/gist_id}","starred_url":"https://api.github.com/users/johnjbarton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnjbarton/subscriptions","organizations_url":"https://api.github.com/users/johnjbarton/orgs","repos_url":"https://api.github.com/users/johnjbarton/repos","events_url":"https://api.github.com/users/johnjbarton/events{/privacy}","received_events_url":"https://api.github.com/users/johnjbarton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-10T00:57:28Z","updated_at":"2015-06-11T22:28:42Z","closed_at":null,"body":"I've reworked the feature test harness into es6 but one of the tests won't pass. It transcodes to:\r\n```\r\n0 'use strict';\r\n1 var $__1,\r\n2     $__2,\r\n3     $__3,\r\n4     $__4;\r\n5 console.log('t a=', typeof a, ' t b=', typeof b, ' t c=', typeof c);\r\n6 console.log('a=', a, ' b=', b, ' c=', c);\r\n7 var a,\r\n8     b,\r\n9     c,\r\n10     x,\r\n11     y,\r\n12     z;\r\n13 console.log('a=', a, ' b=', b, ' c=', c);\r\n14 function checkA() {\r\n15   console.log('a=', a, ' b=', b, ' c=', c);\r\n16   assert.equal(a, 1);\r\n17   assert.isUndefined(b);\r\n18   assert.isUndefined(c);\r\n19   a = b = c = undefined;\r\n20 }\r\n21 var a = ($__3 = (42 === 42 ? [1] : [42])[$traceurRuntime.toProperty(Symbol.iterator)](), ($__4 = $__3.next()).done ? void 0 : $__4.value);\r\n22 checkA();\r\n23 \r\n```\r\nHere is the output\r\n```\r\nt a= number  t b= number  t c= number\r\na= 0  b= 1  c= 3\r\na= 0  b= 1  c= 3\r\na= 1  b= 1  c= 3\r\n```\r\nThe new version uses V8 `runInTheContext` which purports to resemble `(0,eval)('code')`, essentially the call used in the older version. It seems this isn't quite true.\r\n\r\nI'm not surprised that we somehow polluted the global space with values `a, b,c`, but I am surprised that combination of `\"use strict\"` and `var a;`  did not save us. \r\n\r\nAnyway any suggestions? Of course I could force the tests to run again with `eval()` but I was hoping to use the same code for all the node evaluations."},"comment":{"url":"https://api.github.com/repos/google/traceur-compiler/issues/comments/111294018","html_url":"https://github.com/google/traceur-compiler/issues/1956#issuecomment-111294018","issue_url":"https://api.github.com/repos/google/traceur-compiler/issues/1956","id":111294018,"user":{"login":"arv","id":45845,"avatar_url":"https://avatars.githubusercontent.com/u/45845?v=3","gravatar_id":"","url":"https://api.github.com/users/arv","html_url":"https://github.com/arv","followers_url":"https://api.github.com/users/arv/followers","following_url":"https://api.github.com/users/arv/following{/other_user}","gists_url":"https://api.github.com/users/arv/gists{/gist_id}","starred_url":"https://api.github.com/users/arv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arv/subscriptions","organizations_url":"https://api.github.com/users/arv/orgs","repos_url":"https://api.github.com/users/arv/repos","events_url":"https://api.github.com/users/arv/events{/privacy}","received_events_url":"https://api.github.com/users/arv/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T22:28:42Z","updated_at":"2015-06-11T22:28:42Z","body":"I agree with you. The tests sometimes break due to changes in other files. When that happens a more unique name is usually used."}}