{"action":"created","comment":{"url":"https://api.github.com/repos/babel/babili/pulls/comments/97098457","pull_request_review_id":17704130,"id":97098457,"diff_hunk":"@@ -0,0 +1,167 @@\n+jest.autoMockOff();\n+\n+const gutil = require(\"gulp-util\");\n+const babelCore = require(\"babel-core\");\n+const babiliPreset = require(\"babel-preset-babili\");\n+\n+const unpad = require(\"../../../utils/unpad\");\n+const gulpBabili = require(\"../src/index\");\n+\n+describe(\"gulp-babili\", () => {\n+  it(\"should work with a good default\", () => {\n+    return new Promise((resolve, reject) => {\n+      const stream = gulpBabili();\n+\n+      const source = unpad(`\n+        function foo() {\n+          const a = 10;\n+          return a;\n+        }\n+      `);\n+      const expected = \"function foo(){return 10}\";\n+\n+      stream.on(\"data\", function (file) {\n+        expect(file.contents.toString()).toBe(expected);\n+        resolve();\n+      });\n+      stream.on(\"error\", reject);\n+\n+      stream.write(new gutil.File({\n+        path: \"defaults.js\",\n+        contents: new Buffer(source),\n+      }));\n+    });\n+  });\n+\n+  it(\"should take options and pass them to babili\", () => {\n+    return new Promise((resolve, reject) => {\n+      const stream = gulpBabili({\n+        mangle: {\n+          blacklist: {\n+            bar: true\n+          }\n+        }\n+      });\n+\n+      const source = unpad(`\n+        function foo(bar, baz) {\n+          return bar + baz;\n+        }\n+      `);\n+      const expected = \"function foo(bar,a){return bar+a}\";\n+\n+      stream.on(\"data\", function (file) {\n+        expect(file.contents.toString()).toBe(expected);\n+        resolve();\n+      });\n+      stream.on(\"error\", reject);\n+\n+      stream.write(new gutil.File({\n+        path: \"options.js\",\n+        contents: new Buffer(source)\n+      }));\n+    });\n+  });\n+\n+  it(\"should take custom babel and babili\", () => {\n+    return new Promise((resolve, reject) => {\n+      const babel = Object.assign({}, babelCore);\n+\n+      let usedTransform = false;\n+      Object.defineProperty(babel, \"transform\", {\n+        get() {\n+          usedTransform = true;\n+          return babelCore.transform;\n+        }\n+      });\n+\n+      let usedPreset = false;\n+      const babili = function (...args) {\n+        usedPreset = true;\n+        return babiliPreset(...args);\n+      };\n+\n+      const stream = gulpBabili({}, {\n+        babel,\n+        babili,\n+      });\n+\n+      stream.on(\"data\", function () {\n+        expect(usedTransform).toBe(true);\n+        expect(usedPreset).toBe(true);\n+        resolve();\n+      });\n+      stream.on(\"error\", reject);\n+\n+      stream.write(new gutil.File({\n+        path: \"custom-transformers.js\",\n+        contents: new Buffer(\"foo()\")\n+      }));\n+    });\n+  });\n+\n+  describe(\"comments\", () => {\n+    const source = unpad(`\n+      /**\n+       * @license\n+       * This is a test\n+       */\n+      foo();\n+      // this is another comment\n+      bar();\n+      /* YAC - yet another comment */\n+      baz();\n+    `);\n+\n+    let file;\n+\n+    beforeEach(() => {\n+      file = new gutil.File({\n+        path: \"comments.js\",\n+        contents: new Buffer(source)\n+      });\n+    });\n+\n+    xit(\"should remove comments by default except license and preserve\", () => {","path":"packages/gulp-babili/__tests__/gulp-babili-test.js","position":125,"original_position":125,"commit_id":"b7f798f038f1c40d95caf338a0d7448a5cfff275","original_commit_id":"b7f798f038f1c40d95caf338a0d7448a5cfff275","user":{"login":"boopathi","id":294474,"avatar_url":"https://avatars.githubusercontent.com/u/294474?v=3","gravatar_id":"","url":"https://api.github.com/users/boopathi","html_url":"https://github.com/boopathi","followers_url":"https://api.github.com/users/boopathi/followers","following_url":"https://api.github.com/users/boopathi/following{/other_user}","gists_url":"https://api.github.com/users/boopathi/gists{/gist_id}","starred_url":"https://api.github.com/users/boopathi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boopathi/subscriptions","organizations_url":"https://api.github.com/users/boopathi/orgs","repos_url":"https://api.github.com/users/boopathi/repos","events_url":"https://api.github.com/users/boopathi/events{/privacy}","received_events_url":"https://api.github.com/users/boopathi/received_events","type":"User","site_admin":false},"body":"this test is disabled as it removes all comments by default. ","created_at":"2017-01-20T15:51:48Z","updated_at":"2017-01-20T15:51:49Z","html_url":"https://github.com/babel/babili/pull/318#discussion_r97098457","pull_request_url":"https://api.github.com/repos/babel/babili/pulls/318","_links":{"self":{"href":"https://api.github.com/repos/babel/babili/pulls/comments/97098457"},"html":{"href":"https://github.com/babel/babili/pull/318#discussion_r97098457"},"pull_request":{"href":"https://api.github.com/repos/babel/babili/pulls/318"}}},"pull_request":{"url":"https://api.github.com/repos/babel/babili/pulls/318","id":96396987,"html_url":"https://github.com/babel/babili/pull/318","diff_url":"https://github.com/babel/babili/pull/318.diff","patch_url":"https://github.com/babel/babili/pull/318.patch","issue_url":"https://api.github.com/repos/babel/babili/issues/318","number":318,"state":"open","locked":false,"title":"Gulp babili","user":{"login":"boopathi","id":294474,"avatar_url":"https://avatars.githubusercontent.com/u/294474?v=3","gravatar_id":"","url":"https://api.github.com/users/boopathi","html_url":"https://github.com/boopathi","followers_url":"https://api.github.com/users/boopathi/followers","following_url":"https://api.github.com/users/boopathi/following{/other_user}","gists_url":"https://api.github.com/users/boopathi/gists{/gist_id}","starred_url":"https://api.github.com/users/boopathi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boopathi/subscriptions","organizations_url":"https://api.github.com/users/boopathi/orgs","repos_url":"https://api.github.com/users/boopathi/repos","events_url":"https://api.github.com/users/boopathi/events{/privacy}","received_events_url":"https://api.github.com/users/boopathi/received_events","type":"User","site_admin":false},"body":"TODO:\r\n\r\n+ [ ] comments option doesn't work (@hzoo I don't know why shouldPrintComment is not called at all).\r\n+ [ ] README","created_at":"2016-12-03T12:52:14Z","updated_at":"2017-01-20T15:51:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d7c2d709b208c00ff559bf186e704a0876597a8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/babel/babili/pulls/318/commits","review_comments_url":"https://api.github.com/repos/babel/babili/pulls/318/comments","review_comment_url":"https://api.github.com/repos/babel/babili/pulls/comments{/number}","comments_url":"https://api.github.com/repos/babel/babili/issues/318/comments","statuses_url":"https://api.github.com/repos/babel/babili/statuses/b7f798f038f1c40d95caf338a0d7448a5cfff275","head":{"label":"babel:gulp-babili","ref":"gulp-babili","sha":"b7f798f038f1c40d95caf338a0d7448a5cfff275","user":{"login":"babel","id":9637642,"avatar_url":"https://avatars.githubusercontent.com/u/9637642?v=3","gravatar_id":"","url":"https://api.github.com/users/babel","html_url":"https://github.com/babel","followers_url":"https://api.github.com/users/babel/followers","following_url":"https://api.github.com/users/babel/following{/other_user}","gists_url":"https://api.github.com/users/babel/gists{/gist_id}","starred_url":"https://api.github.com/users/babel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babel/subscriptions","organizations_url":"https://api.github.com/users/babel/orgs","repos_url":"https://api.github.com/users/babel/repos","events_url":"https://api.github.com/users/babel/events{/privacy}","received_events_url":"https://api.github.com/users/babel/received_events","type":"Organization","site_admin":false},"repo":{"id":55723051,"name":"babili","full_name":"babel/babili","owner":{"login":"babel","id":9637642,"avatar_url":"https://avatars.githubusercontent.com/u/9637642?v=3","gravatar_id":"","url":"https://api.github.com/users/babel","html_url":"https://github.com/babel","followers_url":"https://api.github.com/users/babel/followers","following_url":"https://api.github.com/users/babel/following{/other_user}","gists_url":"https://api.github.com/users/babel/gists{/gist_id}","starred_url":"https://api.github.com/users/babel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babel/subscriptions","organizations_url":"https://api.github.com/users/babel/orgs","repos_url":"https://api.github.com/users/babel/repos","events_url":"https://api.github.com/users/babel/events{/privacy}","received_events_url":"https://api.github.com/users/babel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/babel/babili","description":":scissors: An ES6+ aware minifier based on the Babel toolchain (beta)","fork":false,"url":"https://api.github.com/repos/babel/babili","forks_url":"https://api.github.com/repos/babel/babili/forks","keys_url":"https://api.github.com/repos/babel/babili/keys{/key_id}","collaborators_url":"https://api.github.com/repos/babel/babili/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/babel/babili/teams","hooks_url":"https://api.github.com/repos/babel/babili/hooks","issue_events_url":"https://api.github.com/repos/babel/babili/issues/events{/number}","events_url":"https://api.github.com/repos/babel/babili/events","assignees_url":"https://api.github.com/repos/babel/babili/assignees{/user}","branches_url":"https://api.github.com/repos/babel/babili/branches{/branch}","tags_url":"https://api.github.com/repos/babel/babili/tags","blobs_url":"https://api.github.com/repos/babel/babili/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/babel/babili/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/babel/babili/git/refs{/sha}","trees_url":"https://api.github.com/repos/babel/babili/git/trees{/sha}","statuses_url":"https://api.github.com/repos/babel/babili/statuses/{sha}","languages_url":"https://api.github.com/repos/babel/babili/languages","stargazers_url":"https://api.github.com/repos/babel/babili/stargazers","contributors_url":"https://api.github.com/repos/babel/babili/contributors","subscribers_url":"https://api.github.com/repos/babel/babili/subscribers","subscription_url":"https://api.github.com/repos/babel/babili/subscription","commits_url":"https://api.github.com/repos/babel/babili/commits{/sha}","git_commits_url":"https://api.github.com/repos/babel/babili/git/commits{/sha}","comments_url":"https://api.github.com/repos/babel/babili/comments{/number}","issue_comment_url":"https://api.github.com/repos/babel/babili/issues/comments{/number}","contents_url":"https://api.github.com/repos/babel/babili/contents/{+path}","compare_url":"https://api.github.com/repos/babel/babili/compare/{base}...{head}","merges_url":"https://api.github.com/repos/babel/babili/merges","archive_url":"https://api.github.com/repos/babel/babili/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/babel/babili/downloads","issues_url":"https://api.github.com/repos/babel/babili/issues{/number}","pulls_url":"https://api.github.com/repos/babel/babili/pulls{/number}","milestones_url":"https://api.github.com/repos/babel/babili/milestones{/number}","notifications_url":"https://api.github.com/repos/babel/babili/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/babel/babili/labels{/name}","releases_url":"https://api.github.com/repos/babel/babili/releases{/id}","deployments_url":"https://api.github.com/repos/babel/babili/deployments","created_at":"2016-04-07T19:43:56Z","updated_at":"2017-01-20T06:07:42Z","pushed_at":"2017-01-20T15:50:34Z","git_url":"git://github.com/babel/babili.git","ssh_url":"git@github.com:babel/babili.git","clone_url":"https://github.com/babel/babili.git","svn_url":"https://github.com/babel/babili","homepage":"https://babeljs.io/repl","size":9916,"stargazers_count":1881,"watchers_count":1881,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":70,"forks":46,"open_issues":70,"watchers":1881,"default_branch":"master"}},"base":{"label":"babel:master","ref":"master","sha":"2b98b98073dd4087dc03302662c69e7c13d43d80","user":{"login":"babel","id":9637642,"avatar_url":"https://avatars.githubusercontent.com/u/9637642?v=3","gravatar_id":"","url":"https://api.github.com/users/babel","html_url":"https://github.com/babel","followers_url":"https://api.github.com/users/babel/followers","following_url":"https://api.github.com/users/babel/following{/other_user}","gists_url":"https://api.github.com/users/babel/gists{/gist_id}","starred_url":"https://api.github.com/users/babel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babel/subscriptions","organizations_url":"https://api.github.com/users/babel/orgs","repos_url":"https://api.github.com/users/babel/repos","events_url":"https://api.github.com/users/babel/events{/privacy}","received_events_url":"https://api.github.com/users/babel/received_events","type":"Organization","site_admin":false},"repo":{"id":55723051,"name":"babili","full_name":"babel/babili","owner":{"login":"babel","id":9637642,"avatar_url":"https://avatars.githubusercontent.com/u/9637642?v=3","gravatar_id":"","url":"https://api.github.com/users/babel","html_url":"https://github.com/babel","followers_url":"https://api.github.com/users/babel/followers","following_url":"https://api.github.com/users/babel/following{/other_user}","gists_url":"https://api.github.com/users/babel/gists{/gist_id}","starred_url":"https://api.github.com/users/babel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babel/subscriptions","organizations_url":"https://api.github.com/users/babel/orgs","repos_url":"https://api.github.com/users/babel/repos","events_url":"https://api.github.com/users/babel/events{/privacy}","received_events_url":"https://api.github.com/users/babel/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/babel/babili","description":":scissors: An ES6+ aware minifier based on the Babel toolchain (beta)","fork":false,"url":"https://api.github.com/repos/babel/babili","forks_url":"https://api.github.com/repos/babel/babili/forks","keys_url":"https://api.github.com/repos/babel/babili/keys{/key_id}","collaborators_url":"https://api.github.com/repos/babel/babili/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/babel/babili/teams","hooks_url":"https://api.github.com/repos/babel/babili/hooks","issue_events_url":"https://api.github.com/repos/babel/babili/issues/events{/number}","events_url":"https://api.github.com/repos/babel/babili/events","assignees_url":"https://api.github.com/repos/babel/babili/assignees{/user}","branches_url":"https://api.github.com/repos/babel/babili/branches{/branch}","tags_url":"https://api.github.com/repos/babel/babili/tags","blobs_url":"https://api.github.com/repos/babel/babili/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/babel/babili/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/babel/babili/git/refs{/sha}","trees_url":"https://api.github.com/repos/babel/babili/git/trees{/sha}","statuses_url":"https://api.github.com/repos/babel/babili/statuses/{sha}","languages_url":"https://api.github.com/repos/babel/babili/languages","stargazers_url":"https://api.github.com/repos/babel/babili/stargazers","contributors_url":"https://api.github.com/repos/babel/babili/contributors","subscribers_url":"https://api.github.com/repos/babel/babili/subscribers","subscription_url":"https://api.github.com/repos/babel/babili/subscription","commits_url":"https://api.github.com/repos/babel/babili/commits{/sha}","git_commits_url":"https://api.github.com/repos/babel/babili/git/commits{/sha}","comments_url":"https://api.github.com/repos/babel/babili/comments{/number}","issue_comment_url":"https://api.github.com/repos/babel/babili/issues/comments{/number}","contents_url":"https://api.github.com/repos/babel/babili/contents/{+path}","compare_url":"https://api.github.com/repos/babel/babili/compare/{base}...{head}","merges_url":"https://api.github.com/repos/babel/babili/merges","archive_url":"https://api.github.com/repos/babel/babili/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/babel/babili/downloads","issues_url":"https://api.github.com/repos/babel/babili/issues{/number}","pulls_url":"https://api.github.com/repos/babel/babili/pulls{/number}","milestones_url":"https://api.github.com/repos/babel/babili/milestones{/number}","notifications_url":"https://api.github.com/repos/babel/babili/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/babel/babili/labels{/name}","releases_url":"https://api.github.com/repos/babel/babili/releases{/id}","deployments_url":"https://api.github.com/repos/babel/babili/deployments","created_at":"2016-04-07T19:43:56Z","updated_at":"2017-01-20T06:07:42Z","pushed_at":"2017-01-20T15:50:34Z","git_url":"git://github.com/babel/babili.git","ssh_url":"git@github.com:babel/babili.git","clone_url":"https://github.com/babel/babili.git","svn_url":"https://github.com/babel/babili","homepage":"https://babeljs.io/repl","size":9916,"stargazers_count":1881,"watchers_count":1881,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":70,"forks":46,"open_issues":70,"watchers":1881,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/babel/babili/pulls/318"},"html":{"href":"https://github.com/babel/babili/pull/318"},"issue":{"href":"https://api.github.com/repos/babel/babili/issues/318"},"comments":{"href":"https://api.github.com/repos/babel/babili/issues/318/comments"},"review_comments":{"href":"https://api.github.com/repos/babel/babili/pulls/318/comments"},"review_comment":{"href":"https://api.github.com/repos/babel/babili/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/babel/babili/pulls/318/commits"},"statuses":{"href":"https://api.github.com/repos/babel/babili/statuses/b7f798f038f1c40d95caf338a0d7448a5cfff275"}}}}
{"actor":{"display_login":"boopathi"}}