Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass committed Jun 29, 2015
1 parent 67dca36 commit 703ad47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ var flatten = function(options) {

if (json.repository) {
if (typeof json.repository === 'object' && typeof json.repository.url === 'string') {
moduleInfo.repository = json.repository.url.replace('git://github.com', 'https://github.com').replace('.git', '');
moduleInfo.repository = json.repository.url.replace('git+ssh://git@', 'git://').replace('.git', '');
moduleInfo.repository = moduleInfo.repository.replace('git://github.com', 'https://github.com').replace('.git', '');
moduleInfo.repository = moduleInfo.repository.replace('git@github.com:', 'https://github.com/').replace('.git', '');
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ var tests = {
},
'and give us results': function (d) {
assert.isTrue(Object.keys(d).length > 70);
assert.equal(d['abbrev@1.0.5'].licenses, 'MIT');
assert.equal(d['abbrev@1.0.7'].licenses, 'ISC');
},
'and convert to CSV': function(d) {
var str = checker.asCSV(d);
assert.equal('"module name","license","repository"', str.split('\n')[0]);
assert.equal('"abbrev@1.0.5","MIT","http://github.com/isaacs/abbrev-js"', str.split('\n')[1]);
assert.equal('"abbrev@1.0.7","ISC","https://github.com/isaacs/abbrev-js"', str.split('\n')[1]);
},
'should parse local without unknown': {
topic: function () {
Expand Down

0 comments on commit 703ad47

Please sign in to comment.