{"action":"opened","number":2,"pull_request":{"url":"https://api.github.com/repos/jolshevski/shelltest/pulls/2","id":43802091,"html_url":"https://github.com/jolshevski/shelltest/pull/2","diff_url":"https://github.com/jolshevski/shelltest/pull/2.diff","patch_url":"https://github.com/jolshevski/shelltest/pull/2.patch","issue_url":"https://api.github.com/repos/jolshevski/shelltest/issues/2","number":2,"state":"open","locked":false,"title":"Make end callback async","user":{"login":"yarikos","id":931046,"avatar_url":"https://avatars.githubusercontent.com/u/931046?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikos","html_url":"https://github.com/yarikos","followers_url":"https://api.github.com/users/yarikos/followers","following_url":"https://api.github.com/users/yarikos/following{/other_user}","gists_url":"https://api.github.com/users/yarikos/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikos/subscriptions","organizations_url":"https://api.github.com/users/yarikos/orgs","repos_url":"https://api.github.com/users/yarikos/repos","events_url":"https://api.github.com/users/yarikos/events{/privacy}","received_events_url":"https://api.github.com/users/yarikos/received_events","type":"User","site_admin":false},"body":"This ```mocha```'s test should fail\r\n\r\n```js\r\nvar chp = require('child_process');\r\nvar shelltest = require('shelltest');\r\n\r\ndescribe(\"shelltest\", function() {\r\n\tit(\"should fail when command produces another output than expected\", function(done) {\r\n\t\tshelltest()\r\n\t\t\t.cmd('sleep 1 && echo some_string')\r\n\t\t\t.expect('stdout', 'another_string')\r\n\t\t\t.end(done)\r\n\t});\r\n});\r\n```\r\nBut it's passed on ```master```, because callback for ```end``` is being invoked immediately.\r\n\r\nI have moved invocation of callback into inside of ```process.exec``` handler and the test become failed. \r\nBut I didn't manage to write a proper test for this case for now and I'm going to add such test and update this pull request then.","created_at":"2015-08-31T19:47:15Z","updated_at":"2015-08-31T19:47:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jolshevski/shelltest/pulls/2/commits","review_comments_url":"https://api.github.com/repos/jolshevski/shelltest/pulls/2/comments","review_comment_url":"https://api.github.com/repos/jolshevski/shelltest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jolshevski/shelltest/issues/2/comments","statuses_url":"https://api.github.com/repos/jolshevski/shelltest/statuses/c4be4e9b351c4045bcd72c42e87840c34fd494bb","head":{"label":"yarikos:make_end_callback_async","ref":"make_end_callback_async","sha":"c4be4e9b351c4045bcd72c42e87840c34fd494bb","user":{"login":"yarikos","id":931046,"avatar_url":"https://avatars.githubusercontent.com/u/931046?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikos","html_url":"https://github.com/yarikos","followers_url":"https://api.github.com/users/yarikos/followers","following_url":"https://api.github.com/users/yarikos/following{/other_user}","gists_url":"https://api.github.com/users/yarikos/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikos/subscriptions","organizations_url":"https://api.github.com/users/yarikos/orgs","repos_url":"https://api.github.com/users/yarikos/repos","events_url":"https://api.github.com/users/yarikos/events{/privacy}","received_events_url":"https://api.github.com/users/yarikos/received_events","type":"User","site_admin":false},"repo":{"id":41688888,"name":"shelltest","full_name":"yarikos/shelltest","owner":{"login":"yarikos","id":931046,"avatar_url":"https://avatars.githubusercontent.com/u/931046?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikos","html_url":"https://github.com/yarikos","followers_url":"https://api.github.com/users/yarikos/followers","following_url":"https://api.github.com/users/yarikos/following{/other_user}","gists_url":"https://api.github.com/users/yarikos/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikos/subscriptions","organizations_url":"https://api.github.com/users/yarikos/orgs","repos_url":"https://api.github.com/users/yarikos/repos","events_url":"https://api.github.com/users/yarikos/events{/privacy}","received_events_url":"https://api.github.com/users/yarikos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yarikos/shelltest","description":"Acceptance testing framework for CLI applications","fork":true,"url":"https://api.github.com/repos/yarikos/shelltest","forks_url":"https://api.github.com/repos/yarikos/shelltest/forks","keys_url":"https://api.github.com/repos/yarikos/shelltest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yarikos/shelltest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yarikos/shelltest/teams","hooks_url":"https://api.github.com/repos/yarikos/shelltest/hooks","issue_events_url":"https://api.github.com/repos/yarikos/shelltest/issues/events{/number}","events_url":"https://api.github.com/repos/yarikos/shelltest/events","assignees_url":"https://api.github.com/repos/yarikos/shelltest/assignees{/user}","branches_url":"https://api.github.com/repos/yarikos/shelltest/branches{/branch}","tags_url":"https://api.github.com/repos/yarikos/shelltest/tags","blobs_url":"https://api.github.com/repos/yarikos/shelltest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yarikos/shelltest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yarikos/shelltest/git/refs{/sha}","trees_url":"https://api.github.com/repos/yarikos/shelltest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yarikos/shelltest/statuses/{sha}","languages_url":"https://api.github.com/repos/yarikos/shelltest/languages","stargazers_url":"https://api.github.com/repos/yarikos/shelltest/stargazers","contributors_url":"https://api.github.com/repos/yarikos/shelltest/contributors","subscribers_url":"https://api.github.com/repos/yarikos/shelltest/subscribers","subscription_url":"https://api.github.com/repos/yarikos/shelltest/subscription","commits_url":"https://api.github.com/repos/yarikos/shelltest/commits{/sha}","git_commits_url":"https://api.github.com/repos/yarikos/shelltest/git/commits{/sha}","comments_url":"https://api.github.com/repos/yarikos/shelltest/comments{/number}","issue_comment_url":"https://api.github.com/repos/yarikos/shelltest/issues/comments{/number}","contents_url":"https://api.github.com/repos/yarikos/shelltest/contents/{+path}","compare_url":"https://api.github.com/repos/yarikos/shelltest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yarikos/shelltest/merges","archive_url":"https://api.github.com/repos/yarikos/shelltest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yarikos/shelltest/downloads","issues_url":"https://api.github.com/repos/yarikos/shelltest/issues{/number}","pulls_url":"https://api.github.com/repos/yarikos/shelltest/pulls{/number}","milestones_url":"https://api.github.com/repos/yarikos/shelltest/milestones{/number}","notifications_url":"https://api.github.com/repos/yarikos/shelltest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yarikos/shelltest/labels{/name}","releases_url":"https://api.github.com/repos/yarikos/shelltest/releases{/id}","created_at":"2015-08-31T17:03:38Z","updated_at":"2015-08-31T17:03:39Z","pushed_at":"2015-08-31T17:08:28Z","git_url":"git://github.com/yarikos/shelltest.git","ssh_url":"git@github.com:yarikos/shelltest.git","clone_url":"https://github.com/yarikos/shelltest.git","svn_url":"https://github.com/yarikos/shelltest","homepage":"","size":160,"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":"jolshevski:master","ref":"master","sha":"2b2aed8b4fae0085a27dba66f06a0d8ab2ed64b2","user":{"login":"jolshevski","id":7576912,"avatar_url":"https://avatars.githubusercontent.com/u/7576912?v=3","gravatar_id":"","url":"https://api.github.com/users/jolshevski","html_url":"https://github.com/jolshevski","followers_url":"https://api.github.com/users/jolshevski/followers","following_url":"https://api.github.com/users/jolshevski/following{/other_user}","gists_url":"https://api.github.com/users/jolshevski/gists{/gist_id}","starred_url":"https://api.github.com/users/jolshevski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolshevski/subscriptions","organizations_url":"https://api.github.com/users/jolshevski/orgs","repos_url":"https://api.github.com/users/jolshevski/repos","events_url":"https://api.github.com/users/jolshevski/events{/privacy}","received_events_url":"https://api.github.com/users/jolshevski/received_events","type":"User","site_admin":false},"repo":{"id":36765724,"name":"shelltest","full_name":"jolshevski/shelltest","owner":{"login":"jolshevski","id":7576912,"avatar_url":"https://avatars.githubusercontent.com/u/7576912?v=3","gravatar_id":"","url":"https://api.github.com/users/jolshevski","html_url":"https://github.com/jolshevski","followers_url":"https://api.github.com/users/jolshevski/followers","following_url":"https://api.github.com/users/jolshevski/following{/other_user}","gists_url":"https://api.github.com/users/jolshevski/gists{/gist_id}","starred_url":"https://api.github.com/users/jolshevski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jolshevski/subscriptions","organizations_url":"https://api.github.com/users/jolshevski/orgs","repos_url":"https://api.github.com/users/jolshevski/repos","events_url":"https://api.github.com/users/jolshevski/events{/privacy}","received_events_url":"https://api.github.com/users/jolshevski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jolshevski/shelltest","description":"Acceptance testing framework for CLI applications","fork":false,"url":"https://api.github.com/repos/jolshevski/shelltest","forks_url":"https://api.github.com/repos/jolshevski/shelltest/forks","keys_url":"https://api.github.com/repos/jolshevski/shelltest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jolshevski/shelltest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jolshevski/shelltest/teams","hooks_url":"https://api.github.com/repos/jolshevski/shelltest/hooks","issue_events_url":"https://api.github.com/repos/jolshevski/shelltest/issues/events{/number}","events_url":"https://api.github.com/repos/jolshevski/shelltest/events","assignees_url":"https://api.github.com/repos/jolshevski/shelltest/assignees{/user}","branches_url":"https://api.github.com/repos/jolshevski/shelltest/branches{/branch}","tags_url":"https://api.github.com/repos/jolshevski/shelltest/tags","blobs_url":"https://api.github.com/repos/jolshevski/shelltest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jolshevski/shelltest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jolshevski/shelltest/git/refs{/sha}","trees_url":"https://api.github.com/repos/jolshevski/shelltest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jolshevski/shelltest/statuses/{sha}","languages_url":"https://api.github.com/repos/jolshevski/shelltest/languages","stargazers_url":"https://api.github.com/repos/jolshevski/shelltest/stargazers","contributors_url":"https://api.github.com/repos/jolshevski/shelltest/contributors","subscribers_url":"https://api.github.com/repos/jolshevski/shelltest/subscribers","subscription_url":"https://api.github.com/repos/jolshevski/shelltest/subscription","commits_url":"https://api.github.com/repos/jolshevski/shelltest/commits{/sha}","git_commits_url":"https://api.github.com/repos/jolshevski/shelltest/git/commits{/sha}","comments_url":"https://api.github.com/repos/jolshevski/shelltest/comments{/number}","issue_comment_url":"https://api.github.com/repos/jolshevski/shelltest/issues/comments{/number}","contents_url":"https://api.github.com/repos/jolshevski/shelltest/contents/{+path}","compare_url":"https://api.github.com/repos/jolshevski/shelltest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jolshevski/shelltest/merges","archive_url":"https://api.github.com/repos/jolshevski/shelltest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jolshevski/shelltest/downloads","issues_url":"https://api.github.com/repos/jolshevski/shelltest/issues{/number}","pulls_url":"https://api.github.com/repos/jolshevski/shelltest/pulls{/number}","milestones_url":"https://api.github.com/repos/jolshevski/shelltest/milestones{/number}","notifications_url":"https://api.github.com/repos/jolshevski/shelltest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jolshevski/shelltest/labels{/name}","releases_url":"https://api.github.com/repos/jolshevski/shelltest/releases{/id}","created_at":"2015-06-02T22:33:19Z","updated_at":"2015-08-27T18:47:52Z","pushed_at":"2015-08-31T19:47:15Z","git_url":"git://github.com/jolshevski/shelltest.git","ssh_url":"git@github.com:jolshevski/shelltest.git","clone_url":"https://github.com/jolshevski/shelltest.git","svn_url":"https://github.com/jolshevski/shelltest","homepage":"","size":160,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jolshevski/shelltest/pulls/2"},"html":{"href":"https://github.com/jolshevski/shelltest/pull/2"},"issue":{"href":"https://api.github.com/repos/jolshevski/shelltest/issues/2"},"comments":{"href":"https://api.github.com/repos/jolshevski/shelltest/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/jolshevski/shelltest/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/jolshevski/shelltest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jolshevski/shelltest/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/jolshevski/shelltest/statuses/c4be4e9b351c4045bcd72c42e87840c34fd494bb"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}