{"action":"created","comment":{"url":"https://api.github.com/repos/appium/appium-adb/pulls/comments/31507646","id":31507646,"diff_hunk":"@@ -0,0 +1,79 @@\n+import chai from 'chai';\n+import chaiAsPromised from 'chai-as-promised';\n+import 'mochawait';\n+import ADB from '../../lib/adb.js';\n+import sinon from 'sinon';\n+\n+chai.use(chaiAsPromised);\n+const should = chai.should();\n+const apiLevel = '21',\n+      IME = 'com.android.inputmethod.latin/.LatinIME',\n+     imeList = `com.android.inputmethod.latin/.LatinIME:\n+  mId=com.android.inputmethod.latin/.LatinIME mSettingsActivityName=com.android\n+  mIsDefaultResId=0x7f070000\n+  Service:\n+    priority=0 preferredOrder=0 match=0x108000 specificIndex=-1 isDefault=false\n+    ServiceInfo:\n+      name=com.android.inputmethod.latin.LatinIME\n+      packageName=com.android.inputmethod.latin\n+      labelRes=0x7f0a0037 nonLocalizedLabel=null icon=0x0 banner=0x0\n+      enabled=true exported=true processName=com.android.inputmethod.latin\n+      permission=android.permission.BIND_INPUT_METHOD\n+      flags=0x0`;\n+\n+describe('adb commands', () => {\n+  let adb = new ADB(), shell;\n+  const createStub = function (mockShellValue) {\n+    shell = sinon.stub(adb, \"shell\", async function () {\n+      return mockShellValue;\n+    });\n+  };\n+  beforeEach(async () => {\n+    await adb.createADB();\n+  });\n+  describe('shell', () => {\n+    afterEach(async () => {\n+      adb.shell.restore();\n+    });\n+    let verifyShellArguments = function (cmd) {","path":"test/unit/adb-commands-specs.js","position":38,"original_position":38,"commit_id":"1a004c7d2a25fe3ace074e0be0aa165e8d3cc804","original_commit_id":"1a004c7d2a25fe3ace074e0be0aa165e8d3cc804","user":{"login":"sebv","id":418288,"avatar_url":"https://avatars.githubusercontent.com/u/418288?v=3","gravatar_id":"","url":"https://api.github.com/users/sebv","html_url":"https://github.com/sebv","followers_url":"https://api.github.com/users/sebv/followers","following_url":"https://api.github.com/users/sebv/following{/other_user}","gists_url":"https://api.github.com/users/sebv/gists{/gist_id}","starred_url":"https://api.github.com/users/sebv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebv/subscriptions","organizations_url":"https://api.github.com/users/sebv/orgs","repos_url":"https://api.github.com/users/sebv/repos","events_url":"https://api.github.com/users/sebv/events{/privacy}","received_events_url":"https://api.github.com/users/sebv/received_events","type":"User","site_admin":false},"body":"You probably want to use a  a mock for this kind of stuff.\r\n\r\n","created_at":"2015-06-02T09:56:50Z","updated_at":"2015-06-02T09:56:50Z","html_url":"https://github.com/appium/appium-adb/pull/78#discussion_r31507646","pull_request_url":"https://api.github.com/repos/appium/appium-adb/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/appium/appium-adb/pulls/comments/31507646"},"html":{"href":"https://github.com/appium/appium-adb/pull/78#discussion_r31507646"},"pull_request":{"href":"https://api.github.com/repos/appium/appium-adb/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/appium/appium-adb/pulls/78","id":36700452,"html_url":"https://github.com/appium/appium-adb/pull/78","diff_url":"https://github.com/appium/appium-adb/pull/78.diff","patch_url":"https://github.com/appium/appium-adb/pull/78.patch","issue_url":"https://api.github.com/repos/appium/appium-adb/issues/78","number":78,"state":"open","locked":false,"title":"Adding more functions of adb and refactoring tests","user":{"login":"moizjv","id":1308607,"avatar_url":"https://avatars.githubusercontent.com/u/1308607?v=3","gravatar_id":"","url":"https://api.github.com/users/moizjv","html_url":"https://github.com/moizjv","followers_url":"https://api.github.com/users/moizjv/followers","following_url":"https://api.github.com/users/moizjv/following{/other_user}","gists_url":"https://api.github.com/users/moizjv/gists{/gist_id}","starred_url":"https://api.github.com/users/moizjv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moizjv/subscriptions","organizations_url":"https://api.github.com/users/moizjv/orgs","repos_url":"https://api.github.com/users/moizjv/repos","events_url":"https://api.github.com/users/moizjv/events{/privacy}","received_events_url":"https://api.github.com/users/moizjv/received_events","type":"User","site_admin":false},"body":"- Refactored tests added functional and unit tests\r\n- Added more methods and tests to ADB. \r\n- Unit tests are still work in progress, aiming to achieve more coverage.  ","created_at":"2015-06-02T07:18:18Z","updated_at":"2015-06-02T09:56:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea3b473635733cd4a4e5238faec2da7de6348bab","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/appium/appium-adb/pulls/78/commits","review_comments_url":"https://api.github.com/repos/appium/appium-adb/pulls/78/comments","review_comment_url":"https://api.github.com/repos/appium/appium-adb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/appium/appium-adb/issues/78/comments","statuses_url":"https://api.github.com/repos/appium/appium-adb/statuses/1a004c7d2a25fe3ace074e0be0aa165e8d3cc804","head":{"label":"moizjv:2.0","ref":"2.0","sha":"1a004c7d2a25fe3ace074e0be0aa165e8d3cc804","user":{"login":"moizjv","id":1308607,"avatar_url":"https://avatars.githubusercontent.com/u/1308607?v=3","gravatar_id":"","url":"https://api.github.com/users/moizjv","html_url":"https://github.com/moizjv","followers_url":"https://api.github.com/users/moizjv/followers","following_url":"https://api.github.com/users/moizjv/following{/other_user}","gists_url":"https://api.github.com/users/moizjv/gists{/gist_id}","starred_url":"https://api.github.com/users/moizjv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moizjv/subscriptions","organizations_url":"https://api.github.com/users/moizjv/orgs","repos_url":"https://api.github.com/users/moizjv/repos","events_url":"https://api.github.com/users/moizjv/events{/privacy}","received_events_url":"https://api.github.com/users/moizjv/received_events","type":"User","site_admin":false},"repo":{"id":20572387,"name":"appium-adb","full_name":"moizjv/appium-adb","owner":{"login":"moizjv","id":1308607,"avatar_url":"https://avatars.githubusercontent.com/u/1308607?v=3","gravatar_id":"","url":"https://api.github.com/users/moizjv","html_url":"https://github.com/moizjv","followers_url":"https://api.github.com/users/moizjv/followers","following_url":"https://api.github.com/users/moizjv/following{/other_user}","gists_url":"https://api.github.com/users/moizjv/gists{/gist_id}","starred_url":"https://api.github.com/users/moizjv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moizjv/subscriptions","organizations_url":"https://api.github.com/users/moizjv/orgs","repos_url":"https://api.github.com/users/moizjv/repos","events_url":"https://api.github.com/users/moizjv/events{/privacy}","received_events_url":"https://api.github.com/users/moizjv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/moizjv/appium-adb","description":"Wrapper around adb used by appium + helper libs","fork":true,"url":"https://api.github.com/repos/moizjv/appium-adb","forks_url":"https://api.github.com/repos/moizjv/appium-adb/forks","keys_url":"https://api.github.com/repos/moizjv/appium-adb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moizjv/appium-adb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moizjv/appium-adb/teams","hooks_url":"https://api.github.com/repos/moizjv/appium-adb/hooks","issue_events_url":"https://api.github.com/repos/moizjv/appium-adb/issues/events{/number}","events_url":"https://api.github.com/repos/moizjv/appium-adb/events","assignees_url":"https://api.github.com/repos/moizjv/appium-adb/assignees{/user}","branches_url":"https://api.github.com/repos/moizjv/appium-adb/branches{/branch}","tags_url":"https://api.github.com/repos/moizjv/appium-adb/tags","blobs_url":"https://api.github.com/repos/moizjv/appium-adb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moizjv/appium-adb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moizjv/appium-adb/git/refs{/sha}","trees_url":"https://api.github.com/repos/moizjv/appium-adb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moizjv/appium-adb/statuses/{sha}","languages_url":"https://api.github.com/repos/moizjv/appium-adb/languages","stargazers_url":"https://api.github.com/repos/moizjv/appium-adb/stargazers","contributors_url":"https://api.github.com/repos/moizjv/appium-adb/contributors","subscribers_url":"https://api.github.com/repos/moizjv/appium-adb/subscribers","subscription_url":"https://api.github.com/repos/moizjv/appium-adb/subscription","commits_url":"https://api.github.com/repos/moizjv/appium-adb/commits{/sha}","git_commits_url":"https://api.github.com/repos/moizjv/appium-adb/git/commits{/sha}","comments_url":"https://api.github.com/repos/moizjv/appium-adb/comments{/number}","issue_comment_url":"https://api.github.com/repos/moizjv/appium-adb/issues/comments{/number}","contents_url":"https://api.github.com/repos/moizjv/appium-adb/contents/{+path}","compare_url":"https://api.github.com/repos/moizjv/appium-adb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moizjv/appium-adb/merges","archive_url":"https://api.github.com/repos/moizjv/appium-adb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moizjv/appium-adb/downloads","issues_url":"https://api.github.com/repos/moizjv/appium-adb/issues{/number}","pulls_url":"https://api.github.com/repos/moizjv/appium-adb/pulls{/number}","milestones_url":"https://api.github.com/repos/moizjv/appium-adb/milestones{/number}","notifications_url":"https://api.github.com/repos/moizjv/appium-adb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moizjv/appium-adb/labels{/name}","releases_url":"https://api.github.com/repos/moizjv/appium-adb/releases{/id}","created_at":"2014-06-06T17:38:31Z","updated_at":"2015-04-16T22:48:50Z","pushed_at":"2015-06-02T07:21:25Z","git_url":"git://github.com/moizjv/appium-adb.git","ssh_url":"git@github.com:moizjv/appium-adb.git","clone_url":"https://github.com/moizjv/appium-adb.git","svn_url":"https://github.com/moizjv/appium-adb","homepage":null,"size":26065,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"appium:2.0","ref":"2.0","sha":"77daee11543f77e91db1389067e53211411b081c","user":{"login":"appium","id":3221291,"avatar_url":"https://avatars.githubusercontent.com/u/3221291?v=3","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"repo":{"id":17339088,"name":"appium-adb","full_name":"appium/appium-adb","owner":{"login":"appium","id":3221291,"avatar_url":"https://avatars.githubusercontent.com/u/3221291?v=3","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appium/appium-adb","description":"Wrapper around adb used by appium + helper libs","fork":false,"url":"https://api.github.com/repos/appium/appium-adb","forks_url":"https://api.github.com/repos/appium/appium-adb/forks","keys_url":"https://api.github.com/repos/appium/appium-adb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appium/appium-adb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appium/appium-adb/teams","hooks_url":"https://api.github.com/repos/appium/appium-adb/hooks","issue_events_url":"https://api.github.com/repos/appium/appium-adb/issues/events{/number}","events_url":"https://api.github.com/repos/appium/appium-adb/events","assignees_url":"https://api.github.com/repos/appium/appium-adb/assignees{/user}","branches_url":"https://api.github.com/repos/appium/appium-adb/branches{/branch}","tags_url":"https://api.github.com/repos/appium/appium-adb/tags","blobs_url":"https://api.github.com/repos/appium/appium-adb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appium/appium-adb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appium/appium-adb/git/refs{/sha}","trees_url":"https://api.github.com/repos/appium/appium-adb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appium/appium-adb/statuses/{sha}","languages_url":"https://api.github.com/repos/appium/appium-adb/languages","stargazers_url":"https://api.github.com/repos/appium/appium-adb/stargazers","contributors_url":"https://api.github.com/repos/appium/appium-adb/contributors","subscribers_url":"https://api.github.com/repos/appium/appium-adb/subscribers","subscription_url":"https://api.github.com/repos/appium/appium-adb/subscription","commits_url":"https://api.github.com/repos/appium/appium-adb/commits{/sha}","git_commits_url":"https://api.github.com/repos/appium/appium-adb/git/commits{/sha}","comments_url":"https://api.github.com/repos/appium/appium-adb/comments{/number}","issue_comment_url":"https://api.github.com/repos/appium/appium-adb/issues/comments{/number}","contents_url":"https://api.github.com/repos/appium/appium-adb/contents/{+path}","compare_url":"https://api.github.com/repos/appium/appium-adb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appium/appium-adb/merges","archive_url":"https://api.github.com/repos/appium/appium-adb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appium/appium-adb/downloads","issues_url":"https://api.github.com/repos/appium/appium-adb/issues{/number}","pulls_url":"https://api.github.com/repos/appium/appium-adb/pulls{/number}","milestones_url":"https://api.github.com/repos/appium/appium-adb/milestones{/number}","notifications_url":"https://api.github.com/repos/appium/appium-adb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appium/appium-adb/labels{/name}","releases_url":"https://api.github.com/repos/appium/appium-adb/releases{/id}","created_at":"2014-03-02T14:20:10Z","updated_at":"2015-04-16T17:09:50Z","pushed_at":"2015-06-02T07:21:26Z","git_url":"git://github.com/appium/appium-adb.git","ssh_url":"git@github.com:appium/appium-adb.git","clone_url":"https://github.com/appium/appium-adb.git","svn_url":"https://github.com/appium/appium-adb","homepage":null,"size":26803,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":13,"forks":24,"open_issues":13,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appium/appium-adb/pulls/78"},"html":{"href":"https://github.com/appium/appium-adb/pull/78"},"issue":{"href":"https://api.github.com/repos/appium/appium-adb/issues/78"},"comments":{"href":"https://api.github.com/repos/appium/appium-adb/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/appium/appium-adb/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/appium/appium-adb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/appium/appium-adb/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/appium/appium-adb/statuses/1a004c7d2a25fe3ace074e0be0aa165e8d3cc804"}}}}