{"action":"created","issue":{"url":"https://api.github.com/repos/socketio/socket.io/issues/2496","repository_url":"https://api.github.com/repos/socketio/socket.io","labels_url":"https://api.github.com/repos/socketio/socket.io/issues/2496/labels{/name}","comments_url":"https://api.github.com/repos/socketio/socket.io/issues/2496/comments","events_url":"https://api.github.com/repos/socketio/socket.io/issues/2496/events","html_url":"https://github.com/socketio/socket.io/pull/2496","id":142053688,"number":2496,"title":"Added test for compat version transformed by babel","user":{"login":"paradite","id":1209810,"avatar_url":"https://avatars.githubusercontent.com/u/1209810?v=3","gravatar_id":"","url":"https://api.github.com/users/paradite","html_url":"https://github.com/paradite","followers_url":"https://api.github.com/users/paradite/followers","following_url":"https://api.github.com/users/paradite/following{/other_user}","gists_url":"https://api.github.com/users/paradite/gists{/gist_id}","starred_url":"https://api.github.com/users/paradite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paradite/subscriptions","organizations_url":"https://api.github.com/users/paradite/orgs","repos_url":"https://api.github.com/users/paradite/repos","events_url":"https://api.github.com/users/paradite/events{/privacy}","received_events_url":"https://api.github.com/users/paradite/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-19T11:29:13Z","updated_at":"2016-03-31T04:51:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/socketio/socket.io/pulls/2496","html_url":"https://github.com/socketio/socket.io/pull/2496","diff_url":"https://github.com/socketio/socket.io/pull/2496.diff","patch_url":"https://github.com/socketio/socket.io/pull/2496.patch"},"body":"This allows to test both the **current** source files in `lib` directory and **compat** version transformed by babel in `dist` directory by setting the environmental variable `MODE`.\r\nIn the future when we move the code base to es6, we can make sure both versions pass the test.\r\n\r\nMajor changes:\r\n- explicit `require` path (`../lib` instead of `..`) in the test, allowing us to switch the default version we serve inside `package.json`'s main between `lib`(current version) and `dist`(compat version) and not affect the tests.\r\n- more verbose output for `mocha` reporter to check if we are testing compat or current version, it prints `testing compat version` in the console (I can change it back to dot since I have tested this in CI and it is running the correct versions)\r\n- build the compat version to `dist` before testing.\r\n- set the environmental variables to instruct the CI to run both current test and compat tests for node 0.10, 0.12, 4. In the future we could drop the current test for node 0.10 and 0.12 when we move to es6."},"comment":{"url":"https://api.github.com/repos/socketio/socket.io/issues/comments/203751457","html_url":"https://github.com/socketio/socket.io/pull/2496#issuecomment-203751457","issue_url":"https://api.github.com/repos/socketio/socket.io/issues/2496","id":203751457,"user":{"login":"paradite","id":1209810,"avatar_url":"https://avatars.githubusercontent.com/u/1209810?v=3","gravatar_id":"","url":"https://api.github.com/users/paradite","html_url":"https://github.com/paradite","followers_url":"https://api.github.com/users/paradite/followers","following_url":"https://api.github.com/users/paradite/following{/other_user}","gists_url":"https://api.github.com/users/paradite/gists{/gist_id}","starred_url":"https://api.github.com/users/paradite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paradite/subscriptions","organizations_url":"https://api.github.com/users/paradite/orgs","repos_url":"https://api.github.com/users/paradite/repos","events_url":"https://api.github.com/users/paradite/events{/privacy}","received_events_url":"https://api.github.com/users/paradite/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T04:51:05Z","updated_at":"2016-03-31T04:51:05Z","body":"@rauchg This PR is needed for the next PR on es6 refactoring which I am working on. \r\nI have refactored all the anonymous functions into arrow functions and the babel transformed version is working well.\r\nI hope you can review this PR soon so that I can send my PR for es6 refactoring."}}