{"action":"created","comment":{"url":"https://api.github.com/repos/commercetools/nodejs/pulls/comments/183300187","pull_request_review_id":114269001,"id":183300187,"diff_hunk":"@@ -0,0 +1,83 @@\n+import fs from 'mz/fs'\n+import tmp from 'tmp'\n+import { getCredentials } from '@commercetools/get-credentials'\n+import { exec } from 'mz/child_process'\n+import { version } from '@commercetools/custom-objects-exporter/package.json'\n+import {\n+  createdCustomObjects,\n+  expectedCustomObjects,\n+} from './helpers/custom-objects-export.data'\n+import { createData, clearData } from './helpers/utils'\n+\n+let projectKey\n+if (process.env.CI === 'true') projectKey = 'custom-objects-export-int-test'\n+else projectKey = process.env.npm_config_projectkey\n+\n+describe('Product Exporter', () => {\n+  let apiConfig\n+  const bin = './integration-tests/node_modules/.bin/custom-objects-exporter'\n+\n+  beforeAll(async () => {\n+    const credentials = await getCredentials(projectKey)\n+    apiConfig = {\n+      host: 'https://auth.sphere.io',\n+      apiUrl: 'https://api.sphere.io',\n+      projectKey,\n+      credentials,\n+    }\n+    await clearData(apiConfig, 'customObjects')\n+\n+    await createData(apiConfig, 'customObjects', createdCustomObjects)\n+  }, 30000)\n+\n+  afterAll(async () => {\n+    await clearData(apiConfig, 'customObjects')\n+  })\n+\n+  describe('CLI basic functionality', () => {\n+    it('should print usage information given the help flag', async () => {\n+      const [stdout, stderr] = await exec(`${bin} --help`)\n+      expect(stderr).toBeFalsy()\n+      expect(stdout).toMatchSnapshot()\n+    })\n+\n+    it('should print the module version given the version flag', async () => {\n+      const [stdout, stderr] = await exec(`${bin} --version`)\n+      expect(stderr).toBeFalsy()\n+      expect(stdout).toBe(`${version}\\n`)\n+    })\n+  })\n+\n+  describe('export function', () => {\n+    it(","path":"integration-tests/cli/custom-objects-export.it.js","position":52,"original_position":52,"commit_id":"53f5135f331ffdaea76cf34598efb3e84e4e9e9a","original_commit_id":"53f5135f331ffdaea76cf34598efb3e84e4e9e9a","user":{"login":"wizzy25","id":20454817,"avatar_url":"https://avatars2.githubusercontent.com/u/20454817?v=4","gravatar_id":"","url":"https://api.github.com/users/wizzy25","html_url":"https://github.com/wizzy25","followers_url":"https://api.github.com/users/wizzy25/followers","following_url":"https://api.github.com/users/wizzy25/following{/other_user}","gists_url":"https://api.github.com/users/wizzy25/gists{/gist_id}","starred_url":"https://api.github.com/users/wizzy25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wizzy25/subscriptions","organizations_url":"https://api.github.com/users/wizzy25/orgs","repos_url":"https://api.github.com/users/wizzy25/repos","events_url":"https://api.github.com/users/wizzy25/events{/privacy}","received_events_url":"https://api.github.com/users/wizzy25/received_events","type":"User","site_admin":false},"body":"This test seems like a lot of tests that could be further separated into different describe/it blocks... Would be nice if you could refactor this to be more granular","created_at":"2018-04-23T07:41:38Z","updated_at":"2018-04-23T07:54:40Z","html_url":"https://github.com/commercetools/nodejs/pull/543#discussion_r183300187","pull_request_url":"https://api.github.com/repos/commercetools/nodejs/pulls/543","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/commercetools/nodejs/pulls/comments/183300187"},"html":{"href":"https://github.com/commercetools/nodejs/pull/543#discussion_r183300187"},"pull_request":{"href":"https://api.github.com/repos/commercetools/nodejs/pulls/543"}}},"pull_request":{"url":"https://api.github.com/repos/commercetools/nodejs/pulls/543","id":183064971,"html_url":"https://github.com/commercetools/nodejs/pull/543","diff_url":"https://github.com/commercetools/nodejs/pull/543.diff","patch_url":"https://github.com/commercetools/nodejs/pull/543.patch","issue_url":"https://api.github.com/repos/commercetools/nodejs/issues/543","number":543,"state":"open","locked":false,"title":"feat(custom-objects-exporter): add new exporter package","user":{"login":"daern91","id":6084427,"avatar_url":"https://avatars2.githubusercontent.com/u/6084427?v=4","gravatar_id":"","url":"https://api.github.com/users/daern91","html_url":"https://github.com/daern91","followers_url":"https://api.github.com/users/daern91/followers","following_url":"https://api.github.com/users/daern91/following{/other_user}","gists_url":"https://api.github.com/users/daern91/gists{/gist_id}","starred_url":"https://api.github.com/users/daern91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daern91/subscriptions","organizations_url":"https://api.github.com/users/daern91/orgs","repos_url":"https://api.github.com/users/daern91/repos","events_url":"https://api.github.com/users/daern91/events{/privacy}","received_events_url":"https://api.github.com/users/daern91/received_events","type":"User","site_admin":false},"body":"#### Summary\r\nPR adds package to export custom objects from CTP in JSON.\r\n\r\n#### Todo\r\n\r\n- Tests\r\n    - [x] Unit\r\n    - [x] Integration\r\n- [x] Documentation\r\n\r\nresolves #434 \r\n","created_at":"2018-04-20T13:37:14Z","updated_at":"2018-04-23T07:54:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9566624f0bc1b8ee154e3eac56e588373861505f","assignee":{"login":"daern91","id":6084427,"avatar_url":"https://avatars2.githubusercontent.com/u/6084427?v=4","gravatar_id":"","url":"https://api.github.com/users/daern91","html_url":"https://github.com/daern91","followers_url":"https://api.github.com/users/daern91/followers","following_url":"https://api.github.com/users/daern91/following{/other_user}","gists_url":"https://api.github.com/users/daern91/gists{/gist_id}","starred_url":"https://api.github.com/users/daern91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daern91/subscriptions","organizations_url":"https://api.github.com/users/daern91/orgs","repos_url":"https://api.github.com/users/daern91/repos","events_url":"https://api.github.com/users/daern91/events{/privacy}","received_events_url":"https://api.github.com/users/daern91/received_events","type":"User","site_admin":false},"assignees":[{"login":"daern91","id":6084427,"avatar_url":"https://avatars2.githubusercontent.com/u/6084427?v=4","gravatar_id":"","url":"https://api.github.com/users/daern91","html_url":"https://github.com/daern91","followers_url":"https://api.github.com/users/daern91/followers","following_url":"https://api.github.com/users/daern91/following{/other_user}","gists_url":"https://api.github.com/users/daern91/gists{/gist_id}","starred_url":"https://api.github.com/users/daern91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daern91/subscriptions","organizations_url":"https://api.github.com/users/daern91/orgs","repos_url":"https://api.github.com/users/daern91/repos","events_url":"https://api.github.com/users/daern91/events{/privacy}","received_events_url":"https://api.github.com/users/daern91/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/commercetools/nodejs/pulls/543/commits","review_comments_url":"https://api.github.com/repos/commercetools/nodejs/pulls/543/comments","review_comment_url":"https://api.github.com/repos/commercetools/nodejs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/commercetools/nodejs/issues/543/comments","statuses_url":"https://api.github.com/repos/commercetools/nodejs/statuses/53f5135f331ffdaea76cf34598efb3e84e4e9e9a","head":{"label":"commercetools:434-custom-objects-exporter","ref":"434-custom-objects-exporter","sha":"53f5135f331ffdaea76cf34598efb3e84e4e9e9a","user":{"login":"commercetools","id":1084585,"avatar_url":"https://avatars3.githubusercontent.com/u/1084585?v=4","gravatar_id":"","url":"https://api.github.com/users/commercetools","html_url":"https://github.com/commercetools","followers_url":"https://api.github.com/users/commercetools/followers","following_url":"https://api.github.com/users/commercetools/following{/other_user}","gists_url":"https://api.github.com/users/commercetools/gists{/gist_id}","starred_url":"https://api.github.com/users/commercetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercetools/subscriptions","organizations_url":"https://api.github.com/users/commercetools/orgs","repos_url":"https://api.github.com/users/commercetools/repos","events_url":"https://api.github.com/users/commercetools/events{/privacy}","received_events_url":"https://api.github.com/users/commercetools/received_events","type":"Organization","site_admin":false},"repo":{"id":70048127,"name":"nodejs","full_name":"commercetools/nodejs","owner":{"login":"commercetools","id":1084585,"avatar_url":"https://avatars3.githubusercontent.com/u/1084585?v=4","gravatar_id":"","url":"https://api.github.com/users/commercetools","html_url":"https://github.com/commercetools","followers_url":"https://api.github.com/users/commercetools/followers","following_url":"https://api.github.com/users/commercetools/following{/other_user}","gists_url":"https://api.github.com/users/commercetools/gists{/gist_id}","starred_url":"https://api.github.com/users/commercetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercetools/subscriptions","organizations_url":"https://api.github.com/users/commercetools/orgs","repos_url":"https://api.github.com/users/commercetools/repos","events_url":"https://api.github.com/users/commercetools/events{/privacy}","received_events_url":"https://api.github.com/users/commercetools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/commercetools/nodejs","description":"Everything related to the Node.js ecosystem for the commercetools platform.","fork":false,"url":"https://api.github.com/repos/commercetools/nodejs","forks_url":"https://api.github.com/repos/commercetools/nodejs/forks","keys_url":"https://api.github.com/repos/commercetools/nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/commercetools/nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/commercetools/nodejs/teams","hooks_url":"https://api.github.com/repos/commercetools/nodejs/hooks","issue_events_url":"https://api.github.com/repos/commercetools/nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/commercetools/nodejs/events","assignees_url":"https://api.github.com/repos/commercetools/nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/commercetools/nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/commercetools/nodejs/tags","blobs_url":"https://api.github.com/repos/commercetools/nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/commercetools/nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/commercetools/nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/commercetools/nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/commercetools/nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/commercetools/nodejs/languages","stargazers_url":"https://api.github.com/repos/commercetools/nodejs/stargazers","contributors_url":"https://api.github.com/repos/commercetools/nodejs/contributors","subscribers_url":"https://api.github.com/repos/commercetools/nodejs/subscribers","subscription_url":"https://api.github.com/repos/commercetools/nodejs/subscription","commits_url":"https://api.github.com/repos/commercetools/nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/commercetools/nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/commercetools/nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/commercetools/nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/commercetools/nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/commercetools/nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/commercetools/nodejs/merges","archive_url":"https://api.github.com/repos/commercetools/nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/commercetools/nodejs/downloads","issues_url":"https://api.github.com/repos/commercetools/nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/commercetools/nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/commercetools/nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/commercetools/nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/commercetools/nodejs/labels{/name}","releases_url":"https://api.github.com/repos/commercetools/nodejs/releases{/id}","deployments_url":"https://api.github.com/repos/commercetools/nodejs/deployments","created_at":"2016-10-05T09:53:20Z","updated_at":"2018-04-18T12:48:16Z","pushed_at":"2018-04-23T02:21:50Z","git_url":"git://github.com/commercetools/nodejs.git","ssh_url":"git@github.com:commercetools/nodejs.git","clone_url":"https://github.com/commercetools/nodejs.git","svn_url":"https://github.com/commercetools/nodejs","homepage":"https://commercetools.github.io/nodejs/","size":3484,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":8,"open_issues":22,"watchers":10,"default_branch":"master"}},"base":{"label":"commercetools:master","ref":"master","sha":"d709c5be4d0f9d17ec0e343af1cadc3f9a1da578","user":{"login":"commercetools","id":1084585,"avatar_url":"https://avatars3.githubusercontent.com/u/1084585?v=4","gravatar_id":"","url":"https://api.github.com/users/commercetools","html_url":"https://github.com/commercetools","followers_url":"https://api.github.com/users/commercetools/followers","following_url":"https://api.github.com/users/commercetools/following{/other_user}","gists_url":"https://api.github.com/users/commercetools/gists{/gist_id}","starred_url":"https://api.github.com/users/commercetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercetools/subscriptions","organizations_url":"https://api.github.com/users/commercetools/orgs","repos_url":"https://api.github.com/users/commercetools/repos","events_url":"https://api.github.com/users/commercetools/events{/privacy}","received_events_url":"https://api.github.com/users/commercetools/received_events","type":"Organization","site_admin":false},"repo":{"id":70048127,"name":"nodejs","full_name":"commercetools/nodejs","owner":{"login":"commercetools","id":1084585,"avatar_url":"https://avatars3.githubusercontent.com/u/1084585?v=4","gravatar_id":"","url":"https://api.github.com/users/commercetools","html_url":"https://github.com/commercetools","followers_url":"https://api.github.com/users/commercetools/followers","following_url":"https://api.github.com/users/commercetools/following{/other_user}","gists_url":"https://api.github.com/users/commercetools/gists{/gist_id}","starred_url":"https://api.github.com/users/commercetools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commercetools/subscriptions","organizations_url":"https://api.github.com/users/commercetools/orgs","repos_url":"https://api.github.com/users/commercetools/repos","events_url":"https://api.github.com/users/commercetools/events{/privacy}","received_events_url":"https://api.github.com/users/commercetools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/commercetools/nodejs","description":"Everything related to the Node.js ecosystem for the commercetools platform.","fork":false,"url":"https://api.github.com/repos/commercetools/nodejs","forks_url":"https://api.github.com/repos/commercetools/nodejs/forks","keys_url":"https://api.github.com/repos/commercetools/nodejs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/commercetools/nodejs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/commercetools/nodejs/teams","hooks_url":"https://api.github.com/repos/commercetools/nodejs/hooks","issue_events_url":"https://api.github.com/repos/commercetools/nodejs/issues/events{/number}","events_url":"https://api.github.com/repos/commercetools/nodejs/events","assignees_url":"https://api.github.com/repos/commercetools/nodejs/assignees{/user}","branches_url":"https://api.github.com/repos/commercetools/nodejs/branches{/branch}","tags_url":"https://api.github.com/repos/commercetools/nodejs/tags","blobs_url":"https://api.github.com/repos/commercetools/nodejs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/commercetools/nodejs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/commercetools/nodejs/git/refs{/sha}","trees_url":"https://api.github.com/repos/commercetools/nodejs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/commercetools/nodejs/statuses/{sha}","languages_url":"https://api.github.com/repos/commercetools/nodejs/languages","stargazers_url":"https://api.github.com/repos/commercetools/nodejs/stargazers","contributors_url":"https://api.github.com/repos/commercetools/nodejs/contributors","subscribers_url":"https://api.github.com/repos/commercetools/nodejs/subscribers","subscription_url":"https://api.github.com/repos/commercetools/nodejs/subscription","commits_url":"https://api.github.com/repos/commercetools/nodejs/commits{/sha}","git_commits_url":"https://api.github.com/repos/commercetools/nodejs/git/commits{/sha}","comments_url":"https://api.github.com/repos/commercetools/nodejs/comments{/number}","issue_comment_url":"https://api.github.com/repos/commercetools/nodejs/issues/comments{/number}","contents_url":"https://api.github.com/repos/commercetools/nodejs/contents/{+path}","compare_url":"https://api.github.com/repos/commercetools/nodejs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/commercetools/nodejs/merges","archive_url":"https://api.github.com/repos/commercetools/nodejs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/commercetools/nodejs/downloads","issues_url":"https://api.github.com/repos/commercetools/nodejs/issues{/number}","pulls_url":"https://api.github.com/repos/commercetools/nodejs/pulls{/number}","milestones_url":"https://api.github.com/repos/commercetools/nodejs/milestones{/number}","notifications_url":"https://api.github.com/repos/commercetools/nodejs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/commercetools/nodejs/labels{/name}","releases_url":"https://api.github.com/repos/commercetools/nodejs/releases{/id}","deployments_url":"https://api.github.com/repos/commercetools/nodejs/deployments","created_at":"2016-10-05T09:53:20Z","updated_at":"2018-04-18T12:48:16Z","pushed_at":"2018-04-23T02:21:50Z","git_url":"git://github.com/commercetools/nodejs.git","ssh_url":"git@github.com:commercetools/nodejs.git","clone_url":"https://github.com/commercetools/nodejs.git","svn_url":"https://github.com/commercetools/nodejs","homepage":"https://commercetools.github.io/nodejs/","size":3484,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":8,"open_issues":22,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/commercetools/nodejs/pulls/543"},"html":{"href":"https://github.com/commercetools/nodejs/pull/543"},"issue":{"href":"https://api.github.com/repos/commercetools/nodejs/issues/543"},"comments":{"href":"https://api.github.com/repos/commercetools/nodejs/issues/543/comments"},"review_comments":{"href":"https://api.github.com/repos/commercetools/nodejs/pulls/543/comments"},"review_comment":{"href":"https://api.github.com/repos/commercetools/nodejs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/commercetools/nodejs/pulls/543/commits"},"statuses":{"href":"https://api.github.com/repos/commercetools/nodejs/statuses/53f5135f331ffdaea76cf34598efb3e84e4e9e9a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wizzy25"}}