{"action":"created","comment":{"url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/pulls/comments/55887319","id":55887319,"diff_hunk":"@@ -0,0 +1,167 @@\n+'use strict';\n+\n+const flow = require('../lib/flow.js');\n+const sinon = require('sinon');\n+const assert = require('assert');\n+\n+describe('flow', function () {\n+    describe('serial', function () {\n+        it('Вызывает функции последовательно', function () {\n+            var func1 = function (next) {\n+                next(null, 'data1');\n+            };\n+            var func2 = function (data, next) {\n+                next(null, 'data2');\n+            };\n+            var spy1 = sinon.spy(func1);\n+            var spy2 = sinon.spy(func2);\n+            var spyCb = sinon.spy(function (error, data) {});\n+            flow.serial([spy1, spy2], spyCb);\n+            assert.ok(spy1.calledOnce);\n+            assert.ok(spy2.calledOnce);\n+            assert.ok(spy1.calledBefore(spy2));\n+            assert.ok(spyCb.calledAfter(spy2));\n+        });\n+\n+        it('Вторая функция не вызывается, если в первой ошибка', function () {\n+            var func1 = function (next) {\n+                next('error1', []);\n+            };\n+            var func2 = function (data, next) {\n+                next(null, 'data2');\n+            };\n+            var spy1 = sinon.spy(func1);\n+            var spy2 = sinon.spy(func2);\n+            var spyCb = sinon.spy(function (error, data) {});\n+            flow.serial([spy1, spy2], spyCb);\n+            assert.ok(spy1.calledOnce);\n+            assert.ok(spy2.callCount === 0);","path":"test/test.js","position":38,"original_position":38,"commit_id":"d652ce92821b80936320d9185382619542be0fb0","original_commit_id":"d652ce92821b80936320d9185382619542be0fb0","user":{"login":"msmirnov","id":2646531,"avatar_url":"https://avatars.githubusercontent.com/u/2646531?v=3","gravatar_id":"","url":"https://api.github.com/users/msmirnov","html_url":"https://github.com/msmirnov","followers_url":"https://api.github.com/users/msmirnov/followers","following_url":"https://api.github.com/users/msmirnov/following{/other_user}","gists_url":"https://api.github.com/users/msmirnov/gists{/gist_id}","starred_url":"https://api.github.com/users/msmirnov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msmirnov/subscriptions","organizations_url":"https://api.github.com/users/msmirnov/orgs","repos_url":"https://api.github.com/users/msmirnov/repos","events_url":"https://api.github.com/users/msmirnov/events{/privacy}","received_events_url":"https://api.github.com/users/msmirnov/received_events","type":"User","site_admin":false},"body":"Можно использовать `notCalled`","created_at":"2016-03-11T20:56:24Z","updated_at":"2016-03-11T20:56:24Z","html_url":"https://github.com/urfu-2015/webdev-tasks-3/pull/24#discussion_r55887319","pull_request_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/pulls/comments/55887319"},"html":{"href":"https://github.com/urfu-2015/webdev-tasks-3/pull/24#discussion_r55887319"},"pull_request":{"href":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/pulls/24","id":62282496,"html_url":"https://github.com/urfu-2015/webdev-tasks-3/pull/24","diff_url":"https://github.com/urfu-2015/webdev-tasks-3/pull/24.diff","patch_url":"https://github.com/urfu-2015/webdev-tasks-3/pull/24.patch","issue_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/issues/24","number":24,"state":"open","locked":false,"title":"Хлуткова Анна.","user":{"login":"Anna1004","id":14961227,"avatar_url":"https://avatars.githubusercontent.com/u/14961227?v=3","gravatar_id":"","url":"https://api.github.com/users/Anna1004","html_url":"https://github.com/Anna1004","followers_url":"https://api.github.com/users/Anna1004/followers","following_url":"https://api.github.com/users/Anna1004/following{/other_user}","gists_url":"https://api.github.com/users/Anna1004/gists{/gist_id}","starred_url":"https://api.github.com/users/Anna1004/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anna1004/subscriptions","organizations_url":"https://api.github.com/users/Anna1004/orgs","repos_url":"https://api.github.com/users/Anna1004/repos","events_url":"https://api.github.com/users/Anna1004/events{/privacy}","received_events_url":"https://api.github.com/users/Anna1004/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-03-09T19:31:44Z","updated_at":"2016-03-11T20:56:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6fcd08bfa90d4b8d736016985b45b9caf3c3f89","assignee":{"login":"msmirnov","id":2646531,"avatar_url":"https://avatars.githubusercontent.com/u/2646531?v=3","gravatar_id":"","url":"https://api.github.com/users/msmirnov","html_url":"https://github.com/msmirnov","followers_url":"https://api.github.com/users/msmirnov/followers","following_url":"https://api.github.com/users/msmirnov/following{/other_user}","gists_url":"https://api.github.com/users/msmirnov/gists{/gist_id}","starred_url":"https://api.github.com/users/msmirnov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msmirnov/subscriptions","organizations_url":"https://api.github.com/users/msmirnov/orgs","repos_url":"https://api.github.com/users/msmirnov/repos","events_url":"https://api.github.com/users/msmirnov/events{/privacy}","received_events_url":"https://api.github.com/users/msmirnov/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/pulls/24/commits","review_comments_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/pulls/24/comments","review_comment_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/issues/24/comments","statuses_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/statuses/d652ce92821b80936320d9185382619542be0fb0","head":{"label":"Anna1004:master","ref":"master","sha":"d652ce92821b80936320d9185382619542be0fb0","user":{"login":"Anna1004","id":14961227,"avatar_url":"https://avatars.githubusercontent.com/u/14961227?v=3","gravatar_id":"","url":"https://api.github.com/users/Anna1004","html_url":"https://github.com/Anna1004","followers_url":"https://api.github.com/users/Anna1004/followers","following_url":"https://api.github.com/users/Anna1004/following{/other_user}","gists_url":"https://api.github.com/users/Anna1004/gists{/gist_id}","starred_url":"https://api.github.com/users/Anna1004/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anna1004/subscriptions","organizations_url":"https://api.github.com/users/Anna1004/orgs","repos_url":"https://api.github.com/users/Anna1004/repos","events_url":"https://api.github.com/users/Anna1004/events{/privacy}","received_events_url":"https://api.github.com/users/Anna1004/received_events","type":"User","site_admin":false},"repo":{"id":53068406,"name":"webdev-tasks-3","full_name":"Anna1004/webdev-tasks-3","owner":{"login":"Anna1004","id":14961227,"avatar_url":"https://avatars.githubusercontent.com/u/14961227?v=3","gravatar_id":"","url":"https://api.github.com/users/Anna1004","html_url":"https://github.com/Anna1004","followers_url":"https://api.github.com/users/Anna1004/followers","following_url":"https://api.github.com/users/Anna1004/following{/other_user}","gists_url":"https://api.github.com/users/Anna1004/gists{/gist_id}","starred_url":"https://api.github.com/users/Anna1004/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Anna1004/subscriptions","organizations_url":"https://api.github.com/users/Anna1004/orgs","repos_url":"https://api.github.com/users/Anna1004/repos","events_url":"https://api.github.com/users/Anna1004/events{/privacy}","received_events_url":"https://api.github.com/users/Anna1004/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Anna1004/webdev-tasks-3","description":"","fork":true,"url":"https://api.github.com/repos/Anna1004/webdev-tasks-3","forks_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/forks","keys_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/teams","hooks_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/hooks","issue_events_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/issues/events{/number}","events_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/events","assignees_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/assignees{/user}","branches_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/branches{/branch}","tags_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/tags","blobs_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/statuses/{sha}","languages_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/languages","stargazers_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/stargazers","contributors_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/contributors","subscribers_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/subscribers","subscription_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/subscription","commits_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/contents/{+path}","compare_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/merges","archive_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/downloads","issues_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/issues{/number}","pulls_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/pulls{/number}","milestones_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/milestones{/number}","notifications_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/labels{/name}","releases_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/releases{/id}","deployments_url":"https://api.github.com/repos/Anna1004/webdev-tasks-3/deployments","created_at":"2016-03-03T17:11:02Z","updated_at":"2016-03-09T19:31:40Z","pushed_at":"2016-03-09T19:31:40Z","git_url":"git://github.com/Anna1004/webdev-tasks-3.git","ssh_url":"git@github.com:Anna1004/webdev-tasks-3.git","clone_url":"https://github.com/Anna1004/webdev-tasks-3.git","svn_url":"https://github.com/Anna1004/webdev-tasks-3","homepage":null,"size":4,"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":"urfu-2015:master","ref":"master","sha":"c3e314aee6efb6afe54c8e5a1235d04a5597c21b","user":{"login":"urfu-2015","id":14800971,"avatar_url":"https://avatars.githubusercontent.com/u/14800971?v=3","gravatar_id":"","url":"https://api.github.com/users/urfu-2015","html_url":"https://github.com/urfu-2015","followers_url":"https://api.github.com/users/urfu-2015/followers","following_url":"https://api.github.com/users/urfu-2015/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2015/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2015/subscriptions","organizations_url":"https://api.github.com/users/urfu-2015/orgs","repos_url":"https://api.github.com/users/urfu-2015/repos","events_url":"https://api.github.com/users/urfu-2015/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2015/received_events","type":"Organization","site_admin":false},"repo":{"id":53043103,"name":"webdev-tasks-3","full_name":"urfu-2015/webdev-tasks-3","owner":{"login":"urfu-2015","id":14800971,"avatar_url":"https://avatars.githubusercontent.com/u/14800971?v=3","gravatar_id":"","url":"https://api.github.com/users/urfu-2015","html_url":"https://github.com/urfu-2015","followers_url":"https://api.github.com/users/urfu-2015/followers","following_url":"https://api.github.com/users/urfu-2015/following{/other_user}","gists_url":"https://api.github.com/users/urfu-2015/gists{/gist_id}","starred_url":"https://api.github.com/users/urfu-2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfu-2015/subscriptions","organizations_url":"https://api.github.com/users/urfu-2015/orgs","repos_url":"https://api.github.com/users/urfu-2015/repos","events_url":"https://api.github.com/users/urfu-2015/events{/privacy}","received_events_url":"https://api.github.com/users/urfu-2015/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/urfu-2015/webdev-tasks-3","description":"Задача к лекции «Тесты» – «Тесты»","fork":false,"url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3","forks_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/forks","keys_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/teams","hooks_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/hooks","issue_events_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/issues/events{/number}","events_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/events","assignees_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/assignees{/user}","branches_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/branches{/branch}","tags_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/tags","blobs_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/statuses/{sha}","languages_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/languages","stargazers_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/stargazers","contributors_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/contributors","subscribers_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/subscribers","subscription_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/subscription","commits_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/contents/{+path}","compare_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/merges","archive_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/downloads","issues_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/issues{/number}","pulls_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/pulls{/number}","milestones_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/milestones{/number}","notifications_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/labels{/name}","releases_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/releases{/id}","deployments_url":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/deployments","created_at":"2016-03-03T10:50:13Z","updated_at":"2016-03-10T04:48:43Z","pushed_at":"2016-03-11T19:03:54Z","git_url":"git://github.com/urfu-2015/webdev-tasks-3.git","ssh_url":"git@github.com:urfu-2015/webdev-tasks-3.git","clone_url":"https://github.com/urfu-2015/webdev-tasks-3.git","svn_url":"https://github.com/urfu-2015/webdev-tasks-3","homepage":"","size":2,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":27,"forks":30,"open_issues":27,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/pulls/24"},"html":{"href":"https://github.com/urfu-2015/webdev-tasks-3/pull/24"},"issue":{"href":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/issues/24"},"comments":{"href":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/urfu-2015/webdev-tasks-3/statuses/d652ce92821b80936320d9185382619542be0fb0"}}}}