{"action":"created","issue":{"url":"https://api.github.com/repos/postmanlabs/newman/issues/275","labels_url":"https://api.github.com/repos/postmanlabs/newman/issues/275/labels{/name}","comments_url":"https://api.github.com/repos/postmanlabs/newman/issues/275/comments","events_url":"https://api.github.com/repos/postmanlabs/newman/issues/275/events","html_url":"https://github.com/postmanlabs/newman/issues/275","id":109915683,"number":275,"title":"TestResponseHandler, use of Object.extend() seems to be corrupting execution environement ","user":{"login":"lorneb","id":7158964,"avatar_url":"https://avatars.githubusercontent.com/u/7158964?v=3","gravatar_id":"","url":"https://api.github.com/users/lorneb","html_url":"https://github.com/lorneb","followers_url":"https://api.github.com/users/lorneb/followers","following_url":"https://api.github.com/users/lorneb/following{/other_user}","gists_url":"https://api.github.com/users/lorneb/gists{/gist_id}","starred_url":"https://api.github.com/users/lorneb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorneb/subscriptions","organizations_url":"https://api.github.com/users/lorneb/orgs","repos_url":"https://api.github.com/users/lorneb/repos","events_url":"https://api.github.com/users/lorneb/events{/privacy}","received_events_url":"https://api.github.com/users/lorneb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"czardoz","id":3726484,"avatar_url":"https://avatars.githubusercontent.com/u/3726484?v=3","gravatar_id":"","url":"https://api.github.com/users/czardoz","html_url":"https://github.com/czardoz","followers_url":"https://api.github.com/users/czardoz/followers","following_url":"https://api.github.com/users/czardoz/following{/other_user}","gists_url":"https://api.github.com/users/czardoz/gists{/gist_id}","starred_url":"https://api.github.com/users/czardoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czardoz/subscriptions","organizations_url":"https://api.github.com/users/czardoz/orgs","repos_url":"https://api.github.com/users/czardoz/repos","events_url":"https://api.github.com/users/czardoz/events{/privacy}","received_events_url":"https://api.github.com/users/czardoz/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-10-06T00:57:20Z","updated_at":"2015-11-06T17:19:52Z","closed_at":null,"body":"I am running newman as a grunt task say step 1 then step 2 is grunt-version-bump.\r\n\r\nversion bump fails, with a message saying that 'undefined is not a function Use --force to continue.'\r\nIf if run each task separately then they work fine.\r\n\r\nIf the newman collection  contains no tests then both steps work as expected.\r\nIf Object.extend() is commented out in the function _createSandboxedEnvironment, inTestResponseHandler.js around line 184,  then both steps work as expected.\r\n\r\nIn version bump this is the code that is failing.\r\n\r\n            if (typeof(sortedArr[i]['values']) !== \"undefined\" ) {\r\n                regexp += \"(\" + sortedArr[i]['values'].join(\"|\") + \")\";\r\n            } else {\r\n\r\nThe .join,  from my console.log outputs it seems as though sortedArr[i]['values'] should be returning undefined but it is returning a function.  I have included two screen shots that show this.\r\n\r\nI've tried researching into what the Object.extend() code is for, would be keen for some insight.\r\n\r\n![goodversionbump](https://cloud.githubusercontent.com/assets/7158964/10297624/f35dbf2e-6c18-11e5-9066-8a51ee9d03f4.PNG)\r\n![failedversionbumpafternewmentests](https://cloud.githubusercontent.com/assets/7158964/10297627/f93b35ac-6c18-11e5-9aa8-bbce6e828003.PNG)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/postmanlabs/newman/issues/comments/154477285","html_url":"https://github.com/postmanlabs/newman/issues/275#issuecomment-154477285","issue_url":"https://api.github.com/repos/postmanlabs/newman/issues/275","id":154477285,"user":{"login":"czardoz","id":3726484,"avatar_url":"https://avatars.githubusercontent.com/u/3726484?v=3","gravatar_id":"","url":"https://api.github.com/users/czardoz","html_url":"https://github.com/czardoz","followers_url":"https://api.github.com/users/czardoz/followers","following_url":"https://api.github.com/users/czardoz/following{/other_user}","gists_url":"https://api.github.com/users/czardoz/gists{/gist_id}","starred_url":"https://api.github.com/users/czardoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/czardoz/subscriptions","organizations_url":"https://api.github.com/users/czardoz/orgs","repos_url":"https://api.github.com/users/czardoz/repos","events_url":"https://api.github.com/users/czardoz/events{/privacy}","received_events_url":"https://api.github.com/users/czardoz/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T17:19:52Z","updated_at":"2015-11-06T17:19:52Z","body":"@lorneb Apologies for the late reply! Object.extend() is actually called outside of the Sandbox. If you are using Node v4.0+, can you try installing Newman Beta (`npm install -g newman@beta`)? There were a couple of tweaks made in the Beta version around the SugarJS injection into the sandbox."}}