{"action":"created","comment":{"url":"https://api.github.com/repos/Real-Skill/javascript-tasks/pulls/comments/67532627","id":67532627,"diff_hunk":"@@ -0,0 +1,158 @@\n+'use strict';\n+\n+var chai = require('chai');\n+var expect = chai.expect;\n+var _ = require('lodash');\n+var datasets = require('../../app/datasets');\n+\n+describe('Lodash training', function()\n+{\n+\n+    describe('constant', function()\n+    {\n+        var params = datasets.constant();\n+        it('should check if first parameter is an object',function()\n+        {\n+            expect(params[0]).to.be.an('object');\n+        });\n+        it('should check objects values',function()\n+        {\n+            expect(params[0]).to.have.property('fred');\n+            expect(params[0]).to.have.property('pebbles');\n+            expect(params[0]).to.have.deep.property('john.age', 36);\n+        });\n+        it('should check if function returns an object', function(){\n+             var getter = _.constant(params[0]);\n+             expect(getter()).to.be.an('object');\n+        });\n+        it('should create a function that returns value', function(){\n+                expect(_.constant.apply(_, params)).to.be.a('function');\n+        });\n+    });\n+\n+    describe('conforms', function()\n+    {\n+        var params = datasets.conforms();\n+        var fun = _.conforms({ 'number': _.partial(_.gt, _, 38) });\n+\n+        it('should check if first parameter is an object',function()\n+        {\n+           expect(params[0]).to.be.an('object');\n+        });\n+        it('should check objects values',function()\n+        {\n+           expect(params[0]).to.have.property('day');\n+           expect(params[0]).to.have.property('number',1);\n+        });\n+        it('should check if it returns a function', function(){\n+            expect(fun).to.be.a('function');\n+        });\n+        it('Creates a function that invokes the predicate properties of source with the corresponding property values of a given object, returning true if all predicates return truthy, else false.', function()\n+        {\n+            expect(fun()).to.be.false;\n+        });\n+    });\n+\n+    describe('flow', function ()\n+    {\n+        var params = datasets.flow();\n+        it('should check if first parameter is a function',function()\n+        {\n+           expect(params[0]).to.be.a('function');\n+        });\n+        it('should create a function that returns value.', function()\n+        {\n+            expect(_.flow.apply(_, params)).to.be.a('function');\n+        });\n+        it('should create a function that returns the result of invoking the given functions with the this binding of the created function, where each successive invocation is supplied the return value of the previous.', function (){\n+            var addDivide = _.flow(_.divide, params[0]);\n+            expect(addDivide(1, 2)).to.equal(0.125);\n+        });\n+    });\n+\n+    describe('flowRight', function()\n+    {\n+        var params = datasets.flowRight();\n+        it('should check if first parameter is a function',function()\n+        {\n+           expect(params[0]).to.be.a('function');\n+        });\n+        it('should check if function return proper value', function(){\n+           var addTriple = _.flowRight(params[0],_.divide);\n+           expect(addTriple(1, 2)).to.equal(0.125);","path":"test/unit/lodash.spec.js","position":82,"original_position":82,"commit_id":"9b5c60edf0d915132e4c4483951bd316c6a810f6","original_commit_id":"9b5c60edf0d915132e4c4483951bd316c6a810f6","user":{"login":"davvvid1","id":8435250,"avatar_url":"https://avatars.githubusercontent.com/u/8435250?v=3","gravatar_id":"","url":"https://api.github.com/users/davvvid1","html_url":"https://github.com/davvvid1","followers_url":"https://api.github.com/users/davvvid1/followers","following_url":"https://api.github.com/users/davvvid1/following{/other_user}","gists_url":"https://api.github.com/users/davvvid1/gists{/gist_id}","starred_url":"https://api.github.com/users/davvvid1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davvvid1/subscriptions","organizations_url":"https://api.github.com/users/davvvid1/orgs","repos_url":"https://api.github.com/users/davvvid1/repos","events_url":"https://api.github.com/users/davvvid1/events{/privacy}","received_events_url":"https://api.github.com/users/davvvid1/received_events","type":"User","site_admin":false},"body":"The same like above. Additionally how can I guess why result of this is 0.125? You have to explain how to calculate that.","created_at":"2016-06-17T15:50:47Z","updated_at":"2016-06-17T15:50:47Z","html_url":"https://github.com/Real-Skill/javascript-tasks/pull/13#discussion_r67532627","pull_request_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/Real-Skill/javascript-tasks/pulls/comments/67532627"},"html":{"href":"https://github.com/Real-Skill/javascript-tasks/pull/13#discussion_r67532627"},"pull_request":{"href":"https://api.github.com/repos/Real-Skill/javascript-tasks/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/Real-Skill/javascript-tasks/pulls/13","id":69330913,"html_url":"https://github.com/Real-Skill/javascript-tasks/pull/13","diff_url":"https://github.com/Real-Skill/javascript-tasks/pull/13.diff","patch_url":"https://github.com/Real-Skill/javascript-tasks/pull/13.patch","issue_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/issues/13","number":13,"state":"open","locked":false,"title":"lodash util part I","user":{"login":"maykel007","id":18609591,"avatar_url":"https://avatars.githubusercontent.com/u/18609591?v=3","gravatar_id":"","url":"https://api.github.com/users/maykel007","html_url":"https://github.com/maykel007","followers_url":"https://api.github.com/users/maykel007/followers","following_url":"https://api.github.com/users/maykel007/following{/other_user}","gists_url":"https://api.github.com/users/maykel007/gists{/gist_id}","starred_url":"https://api.github.com/users/maykel007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maykel007/subscriptions","organizations_url":"https://api.github.com/users/maykel007/orgs","repos_url":"https://api.github.com/users/maykel007/repos","events_url":"https://api.github.com/users/maykel007/events{/privacy}","received_events_url":"https://api.github.com/users/maykel007/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-09T11:26:55Z","updated_at":"2016-06-17T15:50:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6092c14066ae2939998ef14c19be1c1f98aca145","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/pulls/13/commits","review_comments_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/pulls/13/comments","review_comment_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/issues/13/comments","statuses_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/statuses/9b5c60edf0d915132e4c4483951bd316c6a810f6","head":{"label":"maykel007:lodash-util","ref":"lodash-util","sha":"9b5c60edf0d915132e4c4483951bd316c6a810f6","user":{"login":"maykel007","id":18609591,"avatar_url":"https://avatars.githubusercontent.com/u/18609591?v=3","gravatar_id":"","url":"https://api.github.com/users/maykel007","html_url":"https://github.com/maykel007","followers_url":"https://api.github.com/users/maykel007/followers","following_url":"https://api.github.com/users/maykel007/following{/other_user}","gists_url":"https://api.github.com/users/maykel007/gists{/gist_id}","starred_url":"https://api.github.com/users/maykel007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maykel007/subscriptions","organizations_url":"https://api.github.com/users/maykel007/orgs","repos_url":"https://api.github.com/users/maykel007/repos","events_url":"https://api.github.com/users/maykel007/events{/privacy}","received_events_url":"https://api.github.com/users/maykel007/received_events","type":"User","site_admin":false},"repo":{"id":56832412,"name":"javascript-tasks","full_name":"maykel007/javascript-tasks","owner":{"login":"maykel007","id":18609591,"avatar_url":"https://avatars.githubusercontent.com/u/18609591?v=3","gravatar_id":"","url":"https://api.github.com/users/maykel007","html_url":"https://github.com/maykel007","followers_url":"https://api.github.com/users/maykel007/followers","following_url":"https://api.github.com/users/maykel007/following{/other_user}","gists_url":"https://api.github.com/users/maykel007/gists{/gist_id}","starred_url":"https://api.github.com/users/maykel007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maykel007/subscriptions","organizations_url":"https://api.github.com/users/maykel007/orgs","repos_url":"https://api.github.com/users/maykel007/repos","events_url":"https://api.github.com/users/maykel007/events{/privacy}","received_events_url":"https://api.github.com/users/maykel007/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maykel007/javascript-tasks","description":"JavaScript exercises and tasks for RealSkill","fork":true,"url":"https://api.github.com/repos/maykel007/javascript-tasks","forks_url":"https://api.github.com/repos/maykel007/javascript-tasks/forks","keys_url":"https://api.github.com/repos/maykel007/javascript-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maykel007/javascript-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maykel007/javascript-tasks/teams","hooks_url":"https://api.github.com/repos/maykel007/javascript-tasks/hooks","issue_events_url":"https://api.github.com/repos/maykel007/javascript-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/maykel007/javascript-tasks/events","assignees_url":"https://api.github.com/repos/maykel007/javascript-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/maykel007/javascript-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/maykel007/javascript-tasks/tags","blobs_url":"https://api.github.com/repos/maykel007/javascript-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maykel007/javascript-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maykel007/javascript-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/maykel007/javascript-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maykel007/javascript-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/maykel007/javascript-tasks/languages","stargazers_url":"https://api.github.com/repos/maykel007/javascript-tasks/stargazers","contributors_url":"https://api.github.com/repos/maykel007/javascript-tasks/contributors","subscribers_url":"https://api.github.com/repos/maykel007/javascript-tasks/subscribers","subscription_url":"https://api.github.com/repos/maykel007/javascript-tasks/subscription","commits_url":"https://api.github.com/repos/maykel007/javascript-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/maykel007/javascript-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/maykel007/javascript-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/maykel007/javascript-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/maykel007/javascript-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/maykel007/javascript-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maykel007/javascript-tasks/merges","archive_url":"https://api.github.com/repos/maykel007/javascript-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maykel007/javascript-tasks/downloads","issues_url":"https://api.github.com/repos/maykel007/javascript-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/maykel007/javascript-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/maykel007/javascript-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/maykel007/javascript-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maykel007/javascript-tasks/labels{/name}","releases_url":"https://api.github.com/repos/maykel007/javascript-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/maykel007/javascript-tasks/deployments","created_at":"2016-04-22T06:41:02Z","updated_at":"2016-04-22T06:41:04Z","pushed_at":"2016-06-03T07:38:35Z","git_url":"git://github.com/maykel007/javascript-tasks.git","ssh_url":"git@github.com:maykel007/javascript-tasks.git","clone_url":"https://github.com/maykel007/javascript-tasks.git","svn_url":"https://github.com/maykel007/javascript-tasks","homepage":"http://realskill.io","size":1320,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"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":"Real-Skill:lodash-util","ref":"lodash-util","sha":"45fee8da6714150ec574d157e780b10e9db1d572","user":{"login":"Real-Skill","id":11490234,"avatar_url":"https://avatars.githubusercontent.com/u/11490234?v=3","gravatar_id":"","url":"https://api.github.com/users/Real-Skill","html_url":"https://github.com/Real-Skill","followers_url":"https://api.github.com/users/Real-Skill/followers","following_url":"https://api.github.com/users/Real-Skill/following{/other_user}","gists_url":"https://api.github.com/users/Real-Skill/gists{/gist_id}","starred_url":"https://api.github.com/users/Real-Skill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Real-Skill/subscriptions","organizations_url":"https://api.github.com/users/Real-Skill/orgs","repos_url":"https://api.github.com/users/Real-Skill/repos","events_url":"https://api.github.com/users/Real-Skill/events{/privacy}","received_events_url":"https://api.github.com/users/Real-Skill/received_events","type":"Organization","site_admin":false},"repo":{"id":42767280,"name":"javascript-tasks","full_name":"Real-Skill/javascript-tasks","owner":{"login":"Real-Skill","id":11490234,"avatar_url":"https://avatars.githubusercontent.com/u/11490234?v=3","gravatar_id":"","url":"https://api.github.com/users/Real-Skill","html_url":"https://github.com/Real-Skill","followers_url":"https://api.github.com/users/Real-Skill/followers","following_url":"https://api.github.com/users/Real-Skill/following{/other_user}","gists_url":"https://api.github.com/users/Real-Skill/gists{/gist_id}","starred_url":"https://api.github.com/users/Real-Skill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Real-Skill/subscriptions","organizations_url":"https://api.github.com/users/Real-Skill/orgs","repos_url":"https://api.github.com/users/Real-Skill/repos","events_url":"https://api.github.com/users/Real-Skill/events{/privacy}","received_events_url":"https://api.github.com/users/Real-Skill/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Real-Skill/javascript-tasks","description":"JavaScript exercises and tasks for RealSkill","fork":false,"url":"https://api.github.com/repos/Real-Skill/javascript-tasks","forks_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/forks","keys_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/teams","hooks_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/hooks","issue_events_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/events","assignees_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/tags","blobs_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/languages","stargazers_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/stargazers","contributors_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/contributors","subscribers_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/subscribers","subscription_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/subscription","commits_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/merges","archive_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/downloads","issues_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/labels{/name}","releases_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/Real-Skill/javascript-tasks/deployments","created_at":"2015-09-19T09:26:29Z","updated_at":"2016-04-20T16:13:54Z","pushed_at":"2016-06-16T06:59:46Z","git_url":"git://github.com/Real-Skill/javascript-tasks.git","ssh_url":"git@github.com:Real-Skill/javascript-tasks.git","clone_url":"https://github.com/Real-Skill/javascript-tasks.git","svn_url":"https://github.com/Real-Skill/javascript-tasks","homepage":"http://realskill.io","size":1397,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":12,"forks":8,"open_issues":12,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Real-Skill/javascript-tasks/pulls/13"},"html":{"href":"https://github.com/Real-Skill/javascript-tasks/pull/13"},"issue":{"href":"https://api.github.com/repos/Real-Skill/javascript-tasks/issues/13"},"comments":{"href":"https://api.github.com/repos/Real-Skill/javascript-tasks/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/Real-Skill/javascript-tasks/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/Real-Skill/javascript-tasks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Real-Skill/javascript-tasks/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/Real-Skill/javascript-tasks/statuses/9b5c60edf0d915132e4c4483951bd316c6a810f6"}}}}
{"actor":{"display_login":"davvvid1"}}