VimUnDo 8XnV#BdR+K`[kF,S9 t.is(appreciateInfo.githubInfo.user, 'musically-ut');*W!3_W5_$W $test('parsing of auth token', t => {5_Wimport test from 'ava';5_Wimport appreciate from 5_Wimport appreciateApi from 5_$W$test('parsing of auth token', t => {5_W$test('parsing of auth token', t => {5_ W5_ W appreciate5_ W appreciateApi.5_ #W# appreciateApi.readAuthToken('./5_ ;W{; appreciateApi.readAuthToken('./test/sample_auth_token')5_  W; appreciateApi.readAuthToken('./test/sample_auth_token')5_ @W@ t.is(appreciateApi.readAuthToken('./test/sample_auth_token')5_W 5_ W1 12345678901234567890abcdefabcdef123456785_2W2 '12345678901234567890abcdefabcdef123456785_W5_AWA t.is(appreciateApi.readAuthToken('./test/sample_auth_token'),5_AWA t.is(appreciateApi.readAuthToken('./test/sample_auth_token'))5_WA t.is(appreciateApi.readAuthToken('./test/sample_auth_token'))5_ WH return t.is(appreciateApi.readAuthToken('./test/sample_auth_token'))5_ WG return .is(appreciateApi.readAuthToken('./test/sample_auth_token'))5_ WF return is(appreciateApi.readAuthToken('./test/sample_auth_token'))5_ WE return s(appreciateApi.readAuthToken('./test/sample_auth_token'))5_ WD return (appreciateApi.readAuthToken('./test/sample_auth_token'))5_W .then(result => 5_W  t.is(5_W  t.is(result, 5 '12345678901234567890abcdefabcdef12345678');5_EW E t.is(result, '12345678901234567890abcdefabcdef12345678');5_    v W  .then(result => {E t.is(result, '12345678901234567890abcdefabcdef12345678'); })5_!   v W   .then(result => {A t.is(result, '12345678901234567890abcdefabcdef12345678'); })5_ "!  v W   })5_!#"C v W C return appreciateApi.readAuthToken('./test/sample_auth_token'))5_"$#S v W S return appreciateApi.readAuthToken('./test/sample_auth_token')).then(result => 5_#%$ v W5_$&% v W .then(result => {5_%'& v WE t.is(result, '12345678901234567890abcdefabcdef12345678');5_&(' v W });5_')(B v WT return appreciateApi.readAuthToken('./test/sample_auth_token')).then(result => {5_(*) v WT});5_)+* 1 v W] 1test('unsuccessful parsing of auth token', t => {5_*,+  v Wa  5_+-,  v Wa  return 5_,.- S v Wd S return appreciateApi.readAuthToken('./test/sample_auth_token').then(result => {5_-/. / v Wo S return appreciateApi.readAuthToken('./test/sample_auth_token').then(result => {5_.0/ / v Wo B return appreciateApi.readAuthToken('./test/').then(result => {5_/10 8 v Wu S return appreciateApi.readAuthToken('./test/non-existent-file').then(result => {5_021 8 v Wv S return appreciateApi.readAuthToken('./test/non-existant-file').then(result => {5_132  v Ww   t.fail();5_243 H v W S return appreciateApi.readAuthToken('./test/non-existent-file').then(result => {5_354  v W  result => { t.fail();5_465  v W  result => { t.fail(); }, (err)5_576 ! v W  & result => { t.fail(); }, (err)5_687  v W  (err)5_798  v W  (err)5_8:9  v W  err)5_9;:  v W  err)5_:<;  v W H return appreciateApi.readAuthToken('./test/non-existent-file').then(5_;=<  v W B appreciateApi.readAuthToken('./test/non-existent-file').then(5_<>=  v W ! result => { t.fail(); }, 5_=?>  v W  result => { t.fail(); },5_>@?  v W  => { t.fail(); },5_?A@  v W A appreciateApi.readAuthToken('./test/non-existent-file').then(5_@BA  v W I t.throwsappreciateApi.readAuthToken('./test/non-existent-file').then(5_ACB J v W J t.throws(appreciateApi.readAuthToken('./test/non-existent-file').then(5_BDC E v W E t.throws(appreciateApi.readAuthToken('./test/non-existent-file'))5_CED  vW  _ => { t.fail(); }, err => { t.pass(); } );});5_DFE  vWZ });5_EGF  vWb });5_FHG  vW });5_GIH vWS test('extracts dependencies 5_HJI vWY 5_IKJ( vW 5_JLK  vW- const 5_KML vW/ const pkgJSON = 5_LNM vW0' const pkgJSON = "dependencies": {5_MONvW3  "dependencies": { "expand-home-dir": "0.0.3", "gh-got": "^5.0.0", "mz": "^2.4.0" }, "devDependencies": { "ava": "^0.16.0", "xo": "^0.16.0" },5_NPOvW6 "dependencies": {5_OQPvW7 },5_PRQ)vWA) appreciateApi.getProjectDependencies(5_QSRvWE1 appreciateApi.getProjectDependencies(pkgJSON)5_RTS<vWJ< let deps = appreciateApi.getProjectDependencies(pkgJSON)5_SUTvWO deps.sort()5_TVUvWQ deps.sort();5_UYV0vW 0 t.deepEquals(deps, ["ava", "expand-home-dir"5_VZWYvW  const pkgJSON = {5_Y[ZvW   };5_Z\["vW " const pkgJSON = JSON.parse('{5_[]\vW  "dependencies": {5_\^]#vW # "expand-home-dir": "0.0.3",5_]_^vW  "gh-got": "^5.0.0",5_^`_vW  "mz": "^2.4.0"5__a`vW  },5_`bavW  "devDependencies": {5_acbvW  "ava": "^0.16.0",5_bdcvW  "xo": "^0.16.0"5_cedvW  }5_dfevW  }\ "xo": "^0.16.0"\ "ava": "^0.16.0",\ "devDependencies": {\ },\ "mz": "^2.4.0"\ "gh-got": "^5.0.0",\$ "expand-home-dir": "0.0.3",\ "dependencies": {\# const pkgJSON = JSON.parse('{\5_egfvW % const pkgJSON = JSON.parse('{ \5_fhg#vW  $ const pkgJSON = JSON.parse('{ \5_gih vW 5_hjivW 5_ikjvW I t.deepEquals(deps, ["ava", "expand-home-dir", "gh-got", "mz", "xo"]);5_jlkvWI t.deepEquals(deps, ['ava', 'expand-home-dir', 'gh-got', 'mz', 'xo']);5_kml<vW< let deps = appreciateApi.getProjectDependencies(pkgJSON)5_lnm$%v<Wo% } \% "xo": "^0.16.0" \% "ava": "^0.16.0", \% "devDependencies": { \% }, \% "mz": "^2.4.0" \% "gh-got": "^5.0.0", \% "expand-home-dir": "0.0.3", \% "dependencies": { \% const pkgJSON = JSON.parse('{ \5_monWv' "expand-home-dir": "0.0.3", ' +' "gh-got": "^5.0.0", ' +' "mz": "^2.4.0" ' +' }, ' +' "devDependencies": { ' +' "ava": "^0.16.0", ' +' "xo": "^0.16.0" ' +' } ' +' "dependencies": { ' +5_npoWy }');5_oqp W} '}');5_prqW '}'5_qsrW '}'5_rtsW '}' );5_sut!W' const pkgJSON = JSON.parse('{ ' +5_tvuWJ});5_uwv WOtest('5_vxw -W["!-test('extracts Github repo correctly', t => {5_wyx!Wj #"! const pkgJSON = { repository:5_xzy"Wk!%# repository:5_y{z"Wn!%% repository: {5_z|{ $W!'-test('extracts Github repo correctly', t => {5_{}| $W!'/test('extracts Github repo correctly 1', t => {5_|~} $W!'-test('extracts Github repo correctly', t => {5_}~&W%)' };5_~(W= let deps = appreciateApi.getProjectDependencies(pkgJSON); F t.throws(appreciateApi.readAuthToken('./test/non-existent-file'));S return appreciateApi.readAuthToken('./test/sample_auth_token').then(result => {import appreciateApi from './';5_((W')) t.equal(app5_$(W#%)0 url: 'htttps://github.com/user/repo'5_(*(W'))* t.equal(api.getProjectRepo(pkgJSON), "5_((W'))) t.equal(api.getProjectRepo(pkgJSON), 5_((W'))- t.equal(api.getProjectUserRepo(pkgJSON), 5_( (W'))1 t.depeequal(api.getProjectUserRepo(pkgJSON), 5_(1(W'*)1 t.depeEqual(api.getProjectUserRepo(pkgJSON), 5_(2(W'+*2 t.depeEqual(api.getProjectUserRepo(pkgJSON), {5_,( ,vW+});5_.( ,vW-.5_.%( ,vW-/:6test('extracts Github repo correctly extended', t => {5_ ( ,vW!:6test('extracts Github repo correctly extended', t => {5_ $( ,vW!:?test('extracts extended Github repo correctly extended', t => {5_ 2( ,vW!:Dtest('extracts extended Github repo info correctly extended', t => {5_.( ,vW-/:.test('extracts Github repo correctly ', t => {5_.#( ,vW-/:6test('extracts compact Github repo correctly ', t => {5_1( ,vW01 type: 'git',5_0( ,vW/19 repository: {5_0( ,vW/19 repository: / url: 'https://github.com/user/repo'5_0( ,vW/187 repository: url: 'https://github.com/user/repo'5_0( ,vW/186 repository: rl: 'https://github.com/user/repo'5_0( ,vW/185 repository: l: 'https://github.com/user/repo'5_0( ,vW/184 repository: : 'https://github.com/user/repo'5_0( ,vW/183 repository: 'https://github.com/user/repo'5_0( ,vW/182 repository: 'https://github.com/user/repo'5_0( ,vW/181 repository: https://github.com/user/repo'5_0( ,vW/180 repository: ttps://github.com/user/repo'5_0( ,vW/18/ repository: tps://github.com/user/repo'5_0( ,vW/18. repository: ps://github.com/user/repo'5_0( ,vW/18- repository: s://github.com/user/repo'5_0( ,vW/18, repository: ://github.com/user/repo'5_0( ,vW/18+ repository: //github.com/user/repo'5_0( ,vW/18* repository: /github.com/user/repo'5_0( ,vW/18) repository: github.com/user/repo'5_0( ,vW/18( repository: ithub.com/user/repo'5_0( ,vW/18' repository: thub.com/user/repo'5_0( ,vW/18& repository: hub.com/user/repo'5_0( ,vW/18% repository: ub.com/user/repo'5_0( ,vW/18$ repository: b.com/user/repo'5_0( ,vW/18# repository: .com/user/repo'5_0( ,vW/18" repository: com/user/repo'5_0( ,vW/18! repository: om/user/repo'5_0( ,vW/18 repository: m/user/repo'5_0( ,vW/18 repository: /user/repo'5_0( ,vW/18 repository: user/repo'5_1( ,vW01 }5_7(.7vW6});5_9(.7vW895_9(.7vW8:B;test('extracts compact Github repo info correctly ', t => {5_9(.7vW8:B3test(' compact Github repo info correctly ', t => {5_9(.7vW8:B:test('ignores compact Github repo info correctly ', t => {5_9(.7vW8:B3test('ignores Github repo info correctly ', t => {5_9(.7vW8:B,test('ignores repo info correctly ', t => {5_9"(.7vW28:B6test('ignores non-Github repo info correctly ', t => {5_:(.7vW49;B const pkgJSON = { 5_:(:=vW89;B const pkgJSON = { repository: 'user/repo' };2 t.depeEqual(api.getProjectUserRepo(pkgJSON), {5_9+(!'vW>8;>+test('ignores non-Github repo info', t => {5_:(!'vW>9B?:;?5_@(!'vW??@5_<(!'vWC;=E type: 'git',5_<(!'vWC;=E type: '',5_=(!'vWK<>E/ url: 'https://github.com/user/repo'5_=(!'vWL<>E url: 'https://'5_-( ,vWc,;E-.E5_-( ,vWc,.R5_.2( ,vWm-/S;test('extracts extended Github repo info correctly', t => {5_2( ,vWu13S/ url: 'https://github.com/user/repo'5_ ( ,vW~!S;test('extracts extended Github repo info correctly', t => {5_.( ,vW-/S=test('extracts extended Github repo info correctly 2', t => {5_2( ,vW13S* url: '://github.com/user/repo'23S5_24( ,vW13SL url: 'git@github.com:sindresorhus/xo.git://github.com/user/repo'5_2!( ,vW13S5 url: 'git@github.com:sindresorhus/xo.git'5_2!( ,vW13S) url: 'git@github.com:/xo.git'5_2&( ,vW13S- url: 'git@github.com:user/xo.git'5_2&( ,vW13S, url: 'git@github.com:user/o.git'5_2&( ,vW13S+ url: 'git@github.com:user/.git'5_$.( ,vW#%S/ url: 'https://github.com/user/repo'5_!( ,vWGI const pkgJSON = { <> const pkgJSON = { .0 const pkgJSON = {  " const pkgJSON = { 5_P( ,vWOP user: 'user',5_P( ,vWOP repo: 'repo'5_O( ,vWNPQ2 t.depeEqual(api.getProjectUserRepo(pkgJSON), {5_O( ,vWNPQ) t.(api.getProjectUserRepo(pkgJSON), {5_O ( ,vWNPQ. t.equal(api.getProjectUserRepo(pkgJSON), { });5_O-( ,vWNPP2 t.equal(api.getProjectUserRepo(pkgJSON), { });5_O-( ,vWNPP/ t.equal(api.getProjectUserRepo(pkgJSON), );5_G( ,vWYFHP+test('ignores non-Github repo info', t => {5_G( ,vWYFHP%test('ignores non- repo info', t => {5_P(GPvW\O});5_R(GPvW]QR5_R(GPvW^QS[(test('ignores non-git repo info', t => {5_R(GPvW_QS[%test('ignores non- repo info', t => {5_R(GPvWeQS[+test('ignores non-github repo info', t => {5_T(TWvWjSU[ repository: { type: 'svn',B url: 'https://some-repository.com/some-user/some-repo' }5_T(TTvWjSUX repository: 5_R(RRvWsQSX+test('ignores non-Github repo info', t => {5_R(RRvWtQSX!test('ignores repo info', t => {5_T(RRvWwSUX repository: 'gist:some5_X(RXvW|W});5_Z(RXvW|YZ5_Z(RXvW~Y[`%test('ignores gist repo info', t => {5_Z(RXvW~Y[`!test('ignores repo info', t => {5_\(RXvW[]`$ repository: 'gist:some-gist'5_\(RXvW[]` repository: ':some-gist'5_\(RXvW[]`) repository: 'bitbucket:some-gist'5_\(RXvW[]` repository: 'bitbucket:'5_Z(Z`vWY[`*test('ignores bitbucket repo info', t => {5_Z(Z`vWY[`*test('ignores Bitbucket repo info', t => {5_R(Z`vWQS`%test('ignores gist repo info', t => {5_`(Z`vW_});5_b(Z`vWab5_b(Z`vWach*test('ignores BitBucket repo info', t => {5_b(Z`vWach!test('ignores repo info', t => {5_d(Z`vWceh, repository: 'bitbucket:example/repo'5_d(Z`vWceh# repository: ':example/repo'5_O(Z`vWfh3 t.equal(api.getProjectUserRepo(pkgJSON), null);^`3 t.equal(api.getProjectUserRepo(pkgJSON), null);VX3 t.equal(api.getProjectUserRepo(pkgJSON), null);NP3 t.equal(api.getProjectUserRepo(pkgJSON), null);5_((Z`vW@B2 t.depeEqual(api.getProjectUserRepo(pkgJSON), {572 t.depeEqual(api.getProjectUserRepo(pkgJSON), {')2 t.depeEqual(api.getProjectUserRepo(pkgJSON), {5_h(bhvWg});5_j(bhvWij5_j(bhvWikp'test('ignores GitLab repo info', t => {5_j(bhvWikp!test('ignores repo info', t => {5_k(bhvWjlp const pkgJSON = {) repository: 'gitlab:example/repo'5_k(bhvWjlo7 const pkgJSON = { repository: 'gitlab:example/repo' };5_k(bhvWjln: const pkgJSON = { repository: 'gitlab:example/repo' };5_l(bhvWkl5_m(bhvWl});5_o(bhvWn#test('should find all node_modules 5_o(bhvWn test('should find node_modules 5_o(bhvWntest('should find node_modules 5_ p(bhvW oqq oqp5_  p(bhvWoqq api5_   p(bhvWoqq return api5_   p&(bhvWjorq& return api.findNodeModulesOnGithub5_   p'(bhvWoqr> return api.findNodeModulesOnGithub().then(githubInfos => {5_  p,(bhvWoqrD return api.findNodeModulesOnGithub(["xo"]).then(githubInfos => {5_ p.(bhvWoqrF return api.findNodeModulesOnGithub(["xo", ]).then(githubInfos => {5_p3(bhvWoqrK return api.findNodeModulesOnGithub(["xo", "nyc"]).then(githubInfos => {5_pF(bhvWoqr^ return api.findNodeModulesOnGithub(["xo", "nyc", "hosted-git-info"]).then(githubInfos => {5_pd(bhvWorrd return api.findNodeModulesOnGithub(["xo", "nyc", "hosted-git-info", "mz"]).then(githubInfos => {5_q(bhvWprt prs5_q(bhvWprt5_q(bhvWpq5_q(bhvWpst let g = githubInfos.map5_r(bhvWquu githubInfos.map5_r"(bhvW qtw" githubInfos.forEach(x => {5_s&(bhvWrtx& g[x.moduleName] = x.github5_v(bhvWuwx t.is(githubInfos5_p(bhvW'oqd return api.findNodeModulesOnGithub(["xo", "nyc", "hosted-git-info", "mz"]).then(githubInfos => {5_v(bhvW+uwx t.is(g['xo'] 5_v-(bhvW=vxxvwx5_w(bhvW>vxy. t.is(g['xo']['user'], 'sindresorhus');5_ w(bhvW?vxy* t.is(g['xo'][''], 'sindresorhus');5_! w(bhvWAvxy. t.is(g['xo']['repo'], 'sindresorhus');5_ "!w(bhvWBvxy" t.is(g['xo']['repo'], '');5_!#"w (bhvWBwyywxy5_"$#x(bhvWCwyz5_#%$y(bhvWExz{$ t.is(g['xo']['repo'], 'xo');5_$&%y(bhvWExz{# t.is(g['o']['repo'], 'xo');5_%'&y(bhvWFxz{" t.is(g['']['repo'], 'xo');5_&('y(bhvWIxz{% t.is(g['nyc']['repo'], 'xo');5_')(y(bhvWJxz{! t.is(g['nyc'][''], 'xo');5_(*)y (bhvW[xz{% t.is(g['nyc']['user'], 'xo');5_)+*y (bhvW\xz{# t.is(g['nyc']['user'], '');5_*,+y)(bhvW`y{{yz{5_+-,z(bhvWby{|- t.is(g['nyc']['user'], 'istanbuljs');5_,.-z(bhvWby{|) t.is(g['nyc'][''], 'istanbuljs');5_-/.z (bhvWdy{|- t.is(g['nyc']['repo'], 'istanbuljs');5_.0/z (bhvWfy{|# t.is(g['nyc']['repo'], '');5_/10z&(bhvWhy}|& t.is(g['nyc']['repo'], 'nyc');5_021|$(bhvWq{}~$ t.is(g['hosted-git-info'], '5_132v(bhvWyuw~. t.is(g['xo']['user'], 'sindresorhus');5_243v(bhvWyuw~- t.is(g'xo']['user'], 'sindresorhus');5_354v(bhvWyuw~, t.is(gxo']['user'], 'sindresorhus');5_465v(bhvW{uw~- t.is(g.xo']['user'], 'sindresorhus');5_576v(bhvW{uw~, t.is(g.xo]['user'], 'sindresorhus');5_687v(bhvW{uw~+ t.is(g.xo['user'], 'sindresorhus');5_798v(bhvW{uw~* t.is(g.xo'user'], 'sindresorhus');5_8:9v(bhvW|uw~+ t.is(g.xo.'user'], 'sindresorhus');5_9;:v(bhvW|uw~* t.is(g.xo.'user], 'sindresorhus');5_:<;v(bhvW~uw~) t.is(g.xo.'user, 'sindresorhus');5_;=<w(bhvWvx~$ t.is(g['xo']['repo'], 'xo');5_<>=w(bhvWvx~# t.is(g'xo']['repo'], 'xo');5_=?>w(bhvWvx~" t.is(gxo']['repo'], 'xo');5_>@?w(bhvWvx~# t.is(g.xo']['repo'], 'xo');5_?A@w(bhvWvx~" t.is(g.xo]['repo'], 'xo');5_@BAw(bhvWvx~! t.is(g.xo['repo'], 'xo');5_ACBw(bhvWvx~ t.is(g.xo'repo'], 'xo');5_BDCw(bhvWvx~ t.is(g.xorepo'], 'xo');5_CEDw(bhvWvx~ t.is(g.xo.repo'], 'xo');5_DFEw(bhvWvx~ t.is(g.xo.repo], 'xo');5_EGFy(yzWx{~- t.is(g['nyc']['user'], 'istanbuljs');& t.is(g['nyc']['repo'], 'nyc');5_FHGy(yzWy{~$ t.is(gnyc']['repo'], 'nyc');xz~+ t.is(gnyc']['user'], 'istanbuljs');5_GIHy(yzWxz~( t.is(g.nycuser'], 'istanbuljs');x{~, t.is(g.nyc']['user'], 'istanbuljs');% t.is(g.nyc']['repo'], 'nyc');5_HJIy(yzWx{~) t.is(g.nyc.user'], 'istanbuljs');" t.is(g.nyc.repo'], 'nyc');5_IKJ|!(yzW{}~! t.is(g['hosted-git-info']5_JLKz (yzWy}~ t.is(g.nyc.repo, 'nyc');5_KML|%(yzW{}& t.is(g.mz.user, 'normalize');y5_LNM|$(yzW|~|}5_MON}(yzW|~% t.is(g.mz.user, 'normalize');5_NPO}(yzW|~! t.is(g.mz., 'normalize');5_OQP}(yzW|~% t.is(g.mz.repo, 'normalize');5_PRQ}(yzW|~ t.is(g.mz.repo, '');5_QSR)(yzW~) t.is(g['hosted-git-info'].user, '5_RTS.(yzW5_SUT"(yzW/ t.is(g['hosted-git-info'].user, 'npm');5_TVU"(yzW+ t.is(g['hosted-git-info']., 'npm');5_UWV)(yzW/ t.is(g['hosted-git-info'].repo, 'npm');5_VXW)(yzW, t.is(g['hosted-git-info'].repo, '');5_WYX(o}vW});5_XZY'(o}vW'test('should ignore missing/non-github 5_Y[Z(o}vW 5_Z\[(o}vW  5_[]\a(o}vW x return api.findNodeModulesOnGithub(['non-existent-module', 'no-git-module', 'no-repo-module']).then(githubInfos => {5_\^](o}vW & t.is(githubInfo.length, null);5_]_^!(o}vW '' t.is(githubInfos.length, null);5_^`_!(o}vW (# t.is(githubInfos.length, );5__a`d(o}vW .| return api.findNodeModulesOnGithub(['non-existent-module', 'no-git-module', 'no-repo-module'], '').then(githubInfos => {5_`baO(o}vW =5_acb(o}vW A5_bdc`(o}vW  return api.findNodeModulesOnGithub(['non-existent-module', 'no-git-module', 'no-repo-module'], './test/').then(githubInfos => {5_cedv(o}vW  return api.findNodeModulesOnGithub(['non-existent-module', 'no-git-module', 'no-repo-module', 'proper-git-module']], './test/').then(githubInfos => {5_dfe!(o}vW $ t.is(githubInfos.length, 0);5_egf$(o}vW $ t.is(githubInfos.length, 1);5_fhgC(o}vW 5_gih.(o}vW D t.is(githubInfos['proper-git-module'].user, 'musically-ut');5_hji.(o}vW @ t.is(githubInfos['proper-git-module']., 'musically-ut');5_ikj5(o}vW D t.is(githubInfos['proper-git-module'].repo, 'musically-ut');5_jlk5(o}vW  8 t.is(githubInfos['proper-git-module'].repo, '');5_kml(o}vW 9D t.is(githubInfos['proper-git-module'].user, 'musically-ut');5_lnm(o}vW 91 t.is(githubInfos[].user, 'musically-ut');5_mon(o}vW ;D t.is(githubInfos['proper-git-module'].repo, 'lovely-forks');5_npo(o}vW ;!1 t.is(githubInfos[].repo, 'lovely-forks');5_orp(o}vW G2 t.is(githubInfos[0].user, 'musically-ut');5_psqr(o}vW K"2 t.is(githubInfos[0].repo, 'lovely-forks');5_rts!(o}vW$ t.is(githubInfos.length, 1);5_sut(o}vW"= t.is(githubInfos[0].githubInfo.user, 'musically-ut');5_tvu(o}vW#= t.is(githubInfos[0].githubInfo.repo, 'lovely-forks');5_uwv(o}vW# 5_vxw(o}vW, t.is(githubInfo[5_wyx,(o}vW65_xzy(o}vW8- t.is(githubInfo[0].githubInfo, null);5_y|z(o}vW95_z}{|(o}vW<- t.is(githubInfo[1].githubInfo, null);5_|~}(o}vW=#- t.is(githubInfo[3].githubInfo, null);5_}~(WT$- t.is(githubInfo[1].githubInfo, null);- t.is(githubInfo[2].githubInfo, null);- t.is(githubInfo[0].githubInfo, null);5_~ (  W3. t.is(githubInfos[0].githubInfo, null);5_ (  W3- t.s(githubInfos[0].githubInfo, null);5_ (  W3, t.(githubInfos[0].githubInfo, null);5_ (  W7. t.is(githubInfos[1].githubInfo, null);5_ (  W8, t.(githubInfos[1].githubInfo, null);5_ (  W=. t.is(githubInfos[2].githubInfo, null);5_ (  W>, t.(githubInfos[2].githubInfo, null);5_2(  WB2 t.truthy(githubInfos[2].githubInfo, null);5_ ( ((WE2 t.truthy(githubInfos[0].githubInfo, null);2 t.truthy(githubInfos[1].githubInfo, null);2 t.truthy(githubInfos[2].githubInfo, null);5_ (  WH) t.truthy(githubInfos[1].o, null);) t.truthy(githubInfos[2].o, null);) t.truthy(githubInfos[0].o, null);5_%(%%%WJ%. t.truthy(githubInfos[0].erroro, null);. t.truthy(githubInfos[1].erroro, null);. t.truthy(githubInfos[2].erroro, null);5_%(%%%WM- t.truthy(githubInfos[0].error, null);5_%(%%%WN- t.truthy(githubInfos[1].error, null);5_%(%%%WO&- t.truthy(githubInfos[2].error, null);5_(Wz});5_(Wtest'should return error if5_(Wtest('should return error if5_(W 5_#(W* return api.isAppreciated('test-token',5_1(W1 return api.isAppreciated('test-github-token',5_%(W% .then(moduleRepoInfo => {5_(W 5_(W const sampleErr= 5_:(:HvHWK return api.isAppreciated('test-github-token', {error: 'Sample error.'})5_:(:HvHW< return api.isAppreciated('test-github-token', {error: })5_(:HvHW const sampleErr = 5_&(:HvHW& const sampleErr = 'Sample error.'5_(:HvHW' const sampleErr = 'Sample error.';5_(:HvHW t.5_(:HvHW t.equal(5_(:HvHW t.(5_(:HvHW) t.is(5_(:HvHWGtest('should return error if moduleRepoInfo had an error in it', t => {5_(vW});5_(vW5_(vWUtest('isAppreciated should return error if moduleRepoInfo had an error in it', t => {5_(vWTtest('sAppreciated should return error if moduleRepoInfo had an error in it', t => {5_(vWStest('Appreciated should return error if moduleRepoInfo had an error in it', t => {5_2(vWE return api.isAppreciated('test-github-token', {error: sampleErr})5_(vWF return api.isAppreciated('test-github-token', [{error: sampleErr})5_(vWE return api.sAppreciated('test-github-token', [{error: sampleErr})5_(vWD return api.Appreciated('test-github-token', [{error: sampleErr})5_F(vWG return api.areAppreciated('test-github-token', [{error: sampleErr})5_#(vW*6 t.is(moduleRepoInfo.error, sampleErr);5_(vW});5_(vWtest('should create a valid 5_(vW5_(vW 5_-(vW- t.is(api.isStarredURL('test', 'repo'), '/5_#(vW#O t.is(api.isStarredURL('test', 'repo'), 'user/starred/test-user/test-repo');5_(vW%+T t.is(api.isStarredURL('test', 'test-repo'), 'user/starred/test-user/test-repo');5_(vW7Y t.is(api.isStarredURL('test-user', 'test-repo'), 'user/starred/test-user/test-repo');5_(vW?a t.is(api.isStarredURL({ user: 'test-user', 'test-repo'), 'user/starred/test-user/test-repo');5_.(vW@` t.is(api.isStarredURL({user: 'test-user', 'test-repo'), 'user/starred/test-user/test-repo');5_?(vWB,f t.is(api.isStarredURL({user: 'test-user', repo: 'test-repo'), 'user/starred/test-user/test-repo');5_(W});5_4(W4test('getName should return repository name', t => {5_+(W%4test('getName should return repository name', t => {5_(W, t.is(api.getName(5_#(W7+ t.is(api.getName({ githubInfo: 'user', 5_3(W;3 t.is(api.getName({ githubInfo: { user: 'user', 5_?(WHB t.is(api.getName({ githubInfo: { user: 'user', repo: 'repo'}})5_C(WM-C t.is(api.getName({ githubInfo: { user: 'user', repo: 'repo' }})5_(WW});5_F(Wc.Ftest('getName should return moduleName for invalid moduleInfo', t => {5_(W});5_N(WNtest('getUniqueRepos should return only one entry for each repository', t => {5_(W 5_(W };5_(W let moduleInfos = {5_(W let moduleInfos = {5_(W let moduleInfos = [{5_(W let moduleInfos = [{5_(W { module5_(W { module5_ (W { moduleName: 'react',5_ ( v W githubInfo: { user: 'facebook', repo: 'react' }5_ ( v W }5_( v W };5_ ( v W },5_ (  W githubInfo: {# user: 'facebook', repo: 'react' }5_(  W githubInfo: {5_(  W 5_(  W  t.is(api.getUniqueRepos([ 5_3(  W 5_ ( 'v'W!4 t.is(api.getUniqueRepos(moduleInfos).length, 1);5_( 'v'W" let uniqueRepos = 5_ ( 'v'W# t.is(.length, 1);5_ ( 'v'W% t.is(uniqueRepos.length, 1);5_ ( 'v'W0 t.is(uniqueRepos.length, 1);5_ ( 'v'W2 t.is(5_( 'v'W=/ { 5_( v'WR t.is(api.getName({ githubInfo: { user: 'user', repo: 'repo' }}), 'user/repo');5_#( v'WQ t.is(api.getName({githubInfo: { user: 'user', repo: 'repo' }}), 'user/repo');5_=( v'WP t.is(api.getName({githubInfo: {user: 'user', repo: 'repo' }}), 'user/repo');5_Q( v'W` t.is(api.getName({ moduleName: 'module', error: 'Could not open package.json' }), 'module');5_( v'W0_ t.is(api.getName({ moduleName: 'module', error: 'Could not open package.json'}), 'module');5_5( v'W15 let uniqueRepos = api.getUniqueRepos(moduleInfos)5_( v'W });5_6( v'W 6test('getAppreciateModuleInfo should return appreciate5_( v'W  5_*( v'W!E* t.is(appreciateInfo.githubInfo.user, '5_8( v'W!J5_*( v'W!L9 t.is(appreciateInfo.githubInfo.user, 'musically-ut');5_*( v'W!L2- t.is(appreciateInfo.githubInfo.user, '');5_#( v'W!7 t.is(appreciateInfo.githubInfo.user, 'appreciate');5_#( v'W!7 t.is(appreciateInfo.githubInfo.eser, 'appreciate');5_'( v'W!3; t.is(appreciateInfo.githubInfo.repoeser, 'appreciate');5_ ( v W githubInfo: {# user: 'facebook', repo: 'react'5_4(vW&4 t.is(api.isStarredURL('test-user', 'test-repo'),, 'user/starred/test-user/test-repo');5_ (vW& .then(moduleRepoInfos => {5_(:HvHWD return api.sAppreciated('test-github-token', {error: sampleErr})5_(:HvHWC return api.Appreciated('test-github-token', {error: sampleErr})5_(:HvHW(F return api.areAppreciated('test-github-token', {error: sampleErr})5_~ (  W.1 t.isnot(githubInfos[0].githubInfo, null);5_z|{(o}vW9- 2.is(githubInfo[1].githubInfo, null);5_prq(o}vW J= t.is(githubInfos[0]githubInfo..repo, 'lovely-forks');5_p(bhvW oqd return api.findNodeModulesOnGithub(['xo', 'nyc', 'hosted-git-info', 'mz']).then(githubInfos => {5_2 ( ,vWv13S. gitjurl: '://github.com/user/repo'5_.( ,vWi-/S3test(' extended Github repo info correctly', t => {5_.( ,vWi-/S*test(' Github repo info correctly', t => {5_.( ,vWj-/S#test(' repo info correctly', t => {5_;(.7vW5:<B repository: { 'user/repo'5_.( ,vW-/:.test(' Github repo correctly extended', t => {5_~(W)import from './';5_(W)import api from './';5_VXYWvWn  const pkgJSON = {5_WXvWv 'dependencies': {# 'expand-home-dir': '0.0.3', 'gh-got': '^5.0.0', 'mz': '^2.4.0' 'devDependencies': { 'ava': '^0.16.0', 'xo': '^0.16.0'I t.deepEquals(deps, ['ava', 'expand-home-dir', 'gh-got', 'mz', 'xo']);5