{"action":"created","issue":{"url":"https://api.github.com/repos/sporritt/jsPlumb/issues/543","repository_url":"https://api.github.com/repos/sporritt/jsPlumb","labels_url":"https://api.github.com/repos/sporritt/jsPlumb/issues/543/labels{/name}","comments_url":"https://api.github.com/repos/sporritt/jsPlumb/issues/543/comments","events_url":"https://api.github.com/repos/sporritt/jsPlumb/issues/543/events","html_url":"https://github.com/sporritt/jsPlumb/issues/543","id":165002554,"number":543,"title":"Testing jsPlumb using mocha with babel compiler","user":{"login":"ajainarayanan","id":1452845,"avatar_url":"https://avatars.githubusercontent.com/u/1452845?v=3","gravatar_id":"","url":"https://api.github.com/users/ajainarayanan","html_url":"https://github.com/ajainarayanan","followers_url":"https://api.github.com/users/ajainarayanan/followers","following_url":"https://api.github.com/users/ajainarayanan/following{/other_user}","gists_url":"https://api.github.com/users/ajainarayanan/gists{/gist_id}","starred_url":"https://api.github.com/users/ajainarayanan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajainarayanan/subscriptions","organizations_url":"https://api.github.com/users/ajainarayanan/orgs","repos_url":"https://api.github.com/users/ajainarayanan/repos","events_url":"https://api.github.com/users/ajainarayanan/events{/privacy}","received_events_url":"https://api.github.com/users/ajainarayanan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-12T06:21:23Z","updated_at":"2016-07-15T06:38:13Z","closed_at":null,"body":"Running `import jsPlumb from 'jsPlumb'` through mocha seems to be having issues.\r\n\r\nIn a normal application,\r\n- `import jsPlumb from 'jsPlumb'` returns proper `jsPlumb` object.\r\n- when run through mocha (with babel) `import jsPlumb from jsPlumb` returns\r\n```\r\n  {\r\n    jsPlumb: {...},\r\n    jsPlumbUtil: {...}\r\n  }\r\n```\r\nNot sure if its an issue with mocha or babel or jsPlumb. Since I am facing the issue only with jsPlumb I am reporting an issue here. If its not a valid jsPlumb issue please feel free to close the issue. Right now as an alternative I am using the require syntax.\r\n\r\n##### Note:\r\n- The mocha command I am using is,\r\n `mocha --require ignore-styles --compilers js:babel-core/register test/.setup.js test/react-dag-test.js ` (.setup.js sets up navigator and document objects using `js-dom` node module)\r\n- I am right now using `2.2.0` branch of jsPlumb that supports webpack."},"comment":{"url":"https://api.github.com/repos/sporritt/jsPlumb/issues/comments/232872826","html_url":"https://github.com/sporritt/jsPlumb/issues/543#issuecomment-232872826","issue_url":"https://api.github.com/repos/sporritt/jsPlumb/issues/543","id":232872826,"user":{"login":"ajainarayanan","id":1452845,"avatar_url":"https://avatars.githubusercontent.com/u/1452845?v=3","gravatar_id":"","url":"https://api.github.com/users/ajainarayanan","html_url":"https://github.com/ajainarayanan","followers_url":"https://api.github.com/users/ajainarayanan/followers","following_url":"https://api.github.com/users/ajainarayanan/following{/other_user}","gists_url":"https://api.github.com/users/ajainarayanan/gists{/gist_id}","starred_url":"https://api.github.com/users/ajainarayanan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajainarayanan/subscriptions","organizations_url":"https://api.github.com/users/ajainarayanan/orgs","repos_url":"https://api.github.com/users/ajainarayanan/repos","events_url":"https://api.github.com/users/ajainarayanan/events{/privacy}","received_events_url":"https://api.github.com/users/ajainarayanan/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T06:38:13Z","updated_at":"2016-07-15T06:38:13Z","body":"@sporritt Thank you for the reply. Is there any workaround for using `import jsPlumb from 'jsPlumb` for mocha? I am not sure if want to change code just for testing."}}
{"actor":{"display_login":"ajainarayanan"}}