{"action":"created","comment":{"url":"https://api.github.com/repos/bem-incubator/bem-deps/pulls/comments/32948446","id":32948446,"diff_hunk":"@@ -0,0 +1,111 @@\n+var resolve = require('../../lib/index').resolve,\n+    expect =  require('chai').expect;\n+\n+describe('resolve', function () {\n+    describe('input params processing', function () {\n+        it('should return result containing \\'entities\\' and \\'dependOn\\' sections', function () {\n+            var resolved = resolve();\n+\n+            expect(resolved).to.have.all.keys(['entities', 'dependOn']);\n+        });\n+\n+        it('should return empty entities if no args passed', function () {\n+            var resolved = resolve();\n+\n+            expect(resolved.entities).to.be.empty;\n+        });\n+\n+        it('should return empty dependOn if decl is not specified or empty', function () {\n+            var resolved = resolve();\n+\n+            expect(resolved.dependOn).to.be.empty;\n+        });\n+\n+        it('should return empty dependOn for any decl if deps is not specified or empty', function () {\n+            var decl = [{ block: 'A' }],\n+                resolved = resolve(decl);\n+\n+            expect(resolved.dependOn).to.be.empty;\n+        });\n+\n+        it('should return identical decl if no deps specified', function () {\n+            var decl = [\n+                    { block: 'A' }\n+                ],\n+                resolved = resolve(decl);\n+\n+            expect(resolved.entities).to.be.deep.equal(decl);\n+        });\n+\n+        it('should allow to specify single-element deps graph as object', function () {\n+            var decl = [{ block: 'A' }],\n+                depsItem = {\n+                    entity: { block: 'A' },\n+                    dependOn: [\n+                        {\n+                            entity: { block: 'B' }\n+                        }\n+                    ]\n+                },\n+                resolvedDepsArray = resolve(decl, [depsItem]),\n+                resolvedDepsObject = resolve(decl, depsItem);\n+\n+            expect(resolvedDepsArray).to.be.deep.equal(resolvedDepsObject);\n+        });\n+\n+        it('should return identical decl for specific tech for unspecified deps declaration', function () {\n+            var decl = [\n+                    { block: 'A' }\n+                ],\n+                resolved = resolve(decl, undefined, { tech: 'css' });\n+\n+            expect(resolved.entities).to.be.deep.equal(decl);\n+        });\n+\n+        it('should return identical decl for specific tech for empty deps declaration', function () {\n+            var decl = [\n+                    { block: 'A' }","path":"spec/resolve/input.spec.js","position":67,"original_position":67,"commit_id":"89128339837b06cb65db0d203c3aabec532baa54","original_commit_id":"89128339837b06cb65db0d203c3aabec532baa54","user":{"login":"blond","id":2225579,"avatar_url":"https://avatars.githubusercontent.com/u/2225579?v=3","gravatar_id":"","url":"https://api.github.com/users/blond","html_url":"https://github.com/blond","followers_url":"https://api.github.com/users/blond/followers","following_url":"https://api.github.com/users/blond/following{/other_user}","gists_url":"https://api.github.com/users/blond/gists{/gist_id}","starred_url":"https://api.github.com/users/blond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blond/subscriptions","organizations_url":"https://api.github.com/users/blond/orgs","repos_url":"https://api.github.com/users/blond/repos","events_url":"https://api.github.com/users/blond/events{/privacy}","received_events_url":"https://api.github.com/users/blond/received_events","type":"User","site_admin":false},"body":"Тут можно записать покороче: `[{ block: 'A' }]`.","created_at":"2015-06-22T15:41:45Z","updated_at":"2015-06-22T15:41:45Z","html_url":"https://github.com/bem-incubator/bem-deps/pull/8#discussion_r32948446","pull_request_url":"https://api.github.com/repos/bem-incubator/bem-deps/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/bem-incubator/bem-deps/pulls/comments/32948446"},"html":{"href":"https://github.com/bem-incubator/bem-deps/pull/8#discussion_r32948446"},"pull_request":{"href":"https://api.github.com/repos/bem-incubator/bem-deps/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/bem-incubator/bem-deps/pulls/8","id":38232957,"html_url":"https://github.com/bem-incubator/bem-deps/pull/8","diff_url":"https://github.com/bem-incubator/bem-deps/pull/8.diff","patch_url":"https://github.com/bem-incubator/bem-deps/pull/8.patch","issue_url":"https://api.github.com/repos/bem-incubator/bem-deps/issues/8","number":8,"state":"open","locked":false,"title":"Specs covering input params processing","user":{"login":"SwinX","id":854899,"avatar_url":"https://avatars.githubusercontent.com/u/854899?v=3","gravatar_id":"","url":"https://api.github.com/users/SwinX","html_url":"https://github.com/SwinX","followers_url":"https://api.github.com/users/SwinX/followers","following_url":"https://api.github.com/users/SwinX/following{/other_user}","gists_url":"https://api.github.com/users/SwinX/gists{/gist_id}","starred_url":"https://api.github.com/users/SwinX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SwinX/subscriptions","organizations_url":"https://api.github.com/users/SwinX/orgs","repos_url":"https://api.github.com/users/SwinX/repos","events_url":"https://api.github.com/users/SwinX/events{/privacy}","received_events_url":"https://api.github.com/users/SwinX/received_events","type":"User","site_admin":false},"body":"Resolves #7 \r\n\r\n@blond посмотри пожалуйста","created_at":"2015-06-22T13:46:26Z","updated_at":"2015-06-22T15:41:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4567799b7308b3fe1f9f86112c7bc9dd5a25fb2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bem-incubator/bem-deps/pulls/8/commits","review_comments_url":"https://api.github.com/repos/bem-incubator/bem-deps/pulls/8/comments","review_comment_url":"https://api.github.com/repos/bem-incubator/bem-deps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bem-incubator/bem-deps/issues/8/comments","statuses_url":"https://api.github.com/repos/bem-incubator/bem-deps/statuses/89128339837b06cb65db0d203c3aabec532baa54","head":{"label":"bem-incubator:issue-7","ref":"issue-7","sha":"89128339837b06cb65db0d203c3aabec532baa54","user":{"login":"bem-incubator","id":10929504,"avatar_url":"https://avatars.githubusercontent.com/u/10929504?v=3","gravatar_id":"","url":"https://api.github.com/users/bem-incubator","html_url":"https://github.com/bem-incubator","followers_url":"https://api.github.com/users/bem-incubator/followers","following_url":"https://api.github.com/users/bem-incubator/following{/other_user}","gists_url":"https://api.github.com/users/bem-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/bem-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bem-incubator/subscriptions","organizations_url":"https://api.github.com/users/bem-incubator/orgs","repos_url":"https://api.github.com/users/bem-incubator/repos","events_url":"https://api.github.com/users/bem-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/bem-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":36862023,"name":"bem-deps","full_name":"bem-incubator/bem-deps","owner":{"login":"bem-incubator","id":10929504,"avatar_url":"https://avatars.githubusercontent.com/u/10929504?v=3","gravatar_id":"","url":"https://api.github.com/users/bem-incubator","html_url":"https://github.com/bem-incubator","followers_url":"https://api.github.com/users/bem-incubator/followers","following_url":"https://api.github.com/users/bem-incubator/following{/other_user}","gists_url":"https://api.github.com/users/bem-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/bem-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bem-incubator/subscriptions","organizations_url":"https://api.github.com/users/bem-incubator/orgs","repos_url":"https://api.github.com/users/bem-incubator/repos","events_url":"https://api.github.com/users/bem-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/bem-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bem-incubator/bem-deps","description":"","fork":false,"url":"https://api.github.com/repos/bem-incubator/bem-deps","forks_url":"https://api.github.com/repos/bem-incubator/bem-deps/forks","keys_url":"https://api.github.com/repos/bem-incubator/bem-deps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bem-incubator/bem-deps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bem-incubator/bem-deps/teams","hooks_url":"https://api.github.com/repos/bem-incubator/bem-deps/hooks","issue_events_url":"https://api.github.com/repos/bem-incubator/bem-deps/issues/events{/number}","events_url":"https://api.github.com/repos/bem-incubator/bem-deps/events","assignees_url":"https://api.github.com/repos/bem-incubator/bem-deps/assignees{/user}","branches_url":"https://api.github.com/repos/bem-incubator/bem-deps/branches{/branch}","tags_url":"https://api.github.com/repos/bem-incubator/bem-deps/tags","blobs_url":"https://api.github.com/repos/bem-incubator/bem-deps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bem-incubator/bem-deps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bem-incubator/bem-deps/git/refs{/sha}","trees_url":"https://api.github.com/repos/bem-incubator/bem-deps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bem-incubator/bem-deps/statuses/{sha}","languages_url":"https://api.github.com/repos/bem-incubator/bem-deps/languages","stargazers_url":"https://api.github.com/repos/bem-incubator/bem-deps/stargazers","contributors_url":"https://api.github.com/repos/bem-incubator/bem-deps/contributors","subscribers_url":"https://api.github.com/repos/bem-incubator/bem-deps/subscribers","subscription_url":"https://api.github.com/repos/bem-incubator/bem-deps/subscription","commits_url":"https://api.github.com/repos/bem-incubator/bem-deps/commits{/sha}","git_commits_url":"https://api.github.com/repos/bem-incubator/bem-deps/git/commits{/sha}","comments_url":"https://api.github.com/repos/bem-incubator/bem-deps/comments{/number}","issue_comment_url":"https://api.github.com/repos/bem-incubator/bem-deps/issues/comments{/number}","contents_url":"https://api.github.com/repos/bem-incubator/bem-deps/contents/{+path}","compare_url":"https://api.github.com/repos/bem-incubator/bem-deps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bem-incubator/bem-deps/merges","archive_url":"https://api.github.com/repos/bem-incubator/bem-deps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bem-incubator/bem-deps/downloads","issues_url":"https://api.github.com/repos/bem-incubator/bem-deps/issues{/number}","pulls_url":"https://api.github.com/repos/bem-incubator/bem-deps/pulls{/number}","milestones_url":"https://api.github.com/repos/bem-incubator/bem-deps/milestones{/number}","notifications_url":"https://api.github.com/repos/bem-incubator/bem-deps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bem-incubator/bem-deps/labels{/name}","releases_url":"https://api.github.com/repos/bem-incubator/bem-deps/releases{/id}","created_at":"2015-06-04T09:48:14Z","updated_at":"2015-06-04T10:21:51Z","pushed_at":"2015-06-22T14:54:05Z","git_url":"git://github.com/bem-incubator/bem-deps.git","ssh_url":"git@github.com:bem-incubator/bem-deps.git","clone_url":"https://github.com/bem-incubator/bem-deps.git","svn_url":"https://github.com/bem-incubator/bem-deps","homepage":null,"size":284,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":1,"default_branch":"master"}},"base":{"label":"bem-incubator:master","ref":"master","sha":"b909097f0458e68509c053e682cbd70803c49615","user":{"login":"bem-incubator","id":10929504,"avatar_url":"https://avatars.githubusercontent.com/u/10929504?v=3","gravatar_id":"","url":"https://api.github.com/users/bem-incubator","html_url":"https://github.com/bem-incubator","followers_url":"https://api.github.com/users/bem-incubator/followers","following_url":"https://api.github.com/users/bem-incubator/following{/other_user}","gists_url":"https://api.github.com/users/bem-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/bem-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bem-incubator/subscriptions","organizations_url":"https://api.github.com/users/bem-incubator/orgs","repos_url":"https://api.github.com/users/bem-incubator/repos","events_url":"https://api.github.com/users/bem-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/bem-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":36862023,"name":"bem-deps","full_name":"bem-incubator/bem-deps","owner":{"login":"bem-incubator","id":10929504,"avatar_url":"https://avatars.githubusercontent.com/u/10929504?v=3","gravatar_id":"","url":"https://api.github.com/users/bem-incubator","html_url":"https://github.com/bem-incubator","followers_url":"https://api.github.com/users/bem-incubator/followers","following_url":"https://api.github.com/users/bem-incubator/following{/other_user}","gists_url":"https://api.github.com/users/bem-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/bem-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bem-incubator/subscriptions","organizations_url":"https://api.github.com/users/bem-incubator/orgs","repos_url":"https://api.github.com/users/bem-incubator/repos","events_url":"https://api.github.com/users/bem-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/bem-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bem-incubator/bem-deps","description":"","fork":false,"url":"https://api.github.com/repos/bem-incubator/bem-deps","forks_url":"https://api.github.com/repos/bem-incubator/bem-deps/forks","keys_url":"https://api.github.com/repos/bem-incubator/bem-deps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bem-incubator/bem-deps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bem-incubator/bem-deps/teams","hooks_url":"https://api.github.com/repos/bem-incubator/bem-deps/hooks","issue_events_url":"https://api.github.com/repos/bem-incubator/bem-deps/issues/events{/number}","events_url":"https://api.github.com/repos/bem-incubator/bem-deps/events","assignees_url":"https://api.github.com/repos/bem-incubator/bem-deps/assignees{/user}","branches_url":"https://api.github.com/repos/bem-incubator/bem-deps/branches{/branch}","tags_url":"https://api.github.com/repos/bem-incubator/bem-deps/tags","blobs_url":"https://api.github.com/repos/bem-incubator/bem-deps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bem-incubator/bem-deps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bem-incubator/bem-deps/git/refs{/sha}","trees_url":"https://api.github.com/repos/bem-incubator/bem-deps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bem-incubator/bem-deps/statuses/{sha}","languages_url":"https://api.github.com/repos/bem-incubator/bem-deps/languages","stargazers_url":"https://api.github.com/repos/bem-incubator/bem-deps/stargazers","contributors_url":"https://api.github.com/repos/bem-incubator/bem-deps/contributors","subscribers_url":"https://api.github.com/repos/bem-incubator/bem-deps/subscribers","subscription_url":"https://api.github.com/repos/bem-incubator/bem-deps/subscription","commits_url":"https://api.github.com/repos/bem-incubator/bem-deps/commits{/sha}","git_commits_url":"https://api.github.com/repos/bem-incubator/bem-deps/git/commits{/sha}","comments_url":"https://api.github.com/repos/bem-incubator/bem-deps/comments{/number}","issue_comment_url":"https://api.github.com/repos/bem-incubator/bem-deps/issues/comments{/number}","contents_url":"https://api.github.com/repos/bem-incubator/bem-deps/contents/{+path}","compare_url":"https://api.github.com/repos/bem-incubator/bem-deps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bem-incubator/bem-deps/merges","archive_url":"https://api.github.com/repos/bem-incubator/bem-deps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bem-incubator/bem-deps/downloads","issues_url":"https://api.github.com/repos/bem-incubator/bem-deps/issues{/number}","pulls_url":"https://api.github.com/repos/bem-incubator/bem-deps/pulls{/number}","milestones_url":"https://api.github.com/repos/bem-incubator/bem-deps/milestones{/number}","notifications_url":"https://api.github.com/repos/bem-incubator/bem-deps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bem-incubator/bem-deps/labels{/name}","releases_url":"https://api.github.com/repos/bem-incubator/bem-deps/releases{/id}","created_at":"2015-06-04T09:48:14Z","updated_at":"2015-06-04T10:21:51Z","pushed_at":"2015-06-22T14:54:05Z","git_url":"git://github.com/bem-incubator/bem-deps.git","ssh_url":"git@github.com:bem-incubator/bem-deps.git","clone_url":"https://github.com/bem-incubator/bem-deps.git","svn_url":"https://github.com/bem-incubator/bem-deps","homepage":null,"size":284,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":8,"forks":0,"open_issues":8,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bem-incubator/bem-deps/pulls/8"},"html":{"href":"https://github.com/bem-incubator/bem-deps/pull/8"},"issue":{"href":"https://api.github.com/repos/bem-incubator/bem-deps/issues/8"},"comments":{"href":"https://api.github.com/repos/bem-incubator/bem-deps/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/bem-incubator/bem-deps/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/bem-incubator/bem-deps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bem-incubator/bem-deps/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/bem-incubator/bem-deps/statuses/89128339837b06cb65db0d203c3aabec532baa54"}}}}