-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
77 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,48 @@ | ||
{ | ||
"name": "license-checker", | ||
"description": "Check license info for a pacakge", | ||
"author": "Dav Glass <[email protected]>", | ||
"version": "0.0.5", | ||
"dependencies": { | ||
"mkdirp": "*", | ||
"treeify": "*", | ||
"nopt": "*", | ||
"read-installed": "*" | ||
}, | ||
"devDependencies": { | ||
"yui-lint": "~0.1.1", | ||
"jshint": "~1.1.0", | ||
"vows": "*", | ||
"istanbul": "*" | ||
}, | ||
"keywords": [ | ||
"license", "cli", "checker", "oss" | ||
], | ||
"main": "./lib/index.js", | ||
"bin": { | ||
"license-checker": "./bin/license-checker" | ||
}, | ||
"scripts": { | ||
"pretest": "jshint --config ./node_modules/yui-lint/jshint.json ./lib/", | ||
"test": "istanbul cover --print both vows -- --spec ./tests/*.js" | ||
}, | ||
"preferGlobal": "true", | ||
"bugs": { "url" : "https://github.com/davglass/license-checker/issues" }, | ||
"licenses":[ | ||
{ | ||
"type" : "BSD", | ||
"url" : "https://github.com/davglass/license-checker/blob/master/LICENSE" | ||
} | ||
], | ||
"repository": { | ||
"type":"git", | ||
"url":"https://github.com/davglass/license-checker.git" | ||
"name": "license-checker", | ||
"description": "Check license info for a pacakge", | ||
"author": "Dav Glass <[email protected]>", | ||
"version": "0.0.5", | ||
"dependencies": { | ||
"mkdirp": "^0.3.5", | ||
"treeify": "^1.0.1", | ||
"nopt": "^2.2.0", | ||
"read-installed": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"yui-lint": "~0.1.1", | ||
"jshint": "~1.1.0", | ||
"vows": "*", | ||
"istanbul": "*", | ||
"request": "^2.34.0", | ||
"queue": "^1.0.0" | ||
}, | ||
"keywords": [ | ||
"license", | ||
"cli", | ||
"checker", | ||
"oss" | ||
], | ||
"main": "./lib/index.js", | ||
"bin": { | ||
"license-checker": "./bin/license-checker" | ||
}, | ||
"scripts": { | ||
"pretest": "jshint --config ./node_modules/yui-lint/jshint.json ./lib/", | ||
"test": "istanbul cover --print both vows -- --spec ./tests/*.js" | ||
}, | ||
"preferGlobal": "true", | ||
"bugs": { | ||
"url": "https://github.com/davglass/license-checker/issues" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "BSD", | ||
"url": "https://github.com/davglass/license-checker/blob/master/LICENSE" | ||
} | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/davglass/license-checker.git" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
var vows = require('vows'), | ||
assert = require('assert'), | ||
path = require('path'), | ||
checker = require('../lib/index'); | ||
|
||
var tests = { | ||
|
@@ -13,6 +14,37 @@ var tests = { | |
'should load print': function(topic) { | ||
assert.isFunction(topic.print); | ||
} | ||
}, | ||
'should parse local with unknown': { | ||
topic: function () { | ||
var self = this; | ||
|
||
checker.init({ | ||
start: path.join(__dirname, '../') | ||
}, function (sorted) { | ||
self.callback(null, sorted); | ||
}); | ||
}, | ||
'and give us results': function (d) { | ||
assert.isTrue(Object.keys(d).length > 70); | ||
assert.equal(d['[email protected]'].licenses, 'MIT'); | ||
}, | ||
'should parse local without unknown': { | ||
topic: function () { | ||
var self = this; | ||
|
||
checker.init({ | ||
start: path.join(__dirname, '../'), | ||
unknown: true | ||
}, function (sorted) { | ||
self.callback(null, sorted); | ||
}); | ||
}, | ||
'and give us results': function (d) { | ||
assert.equal(d['[email protected]'].licenses, 'BSD*'); | ||
assert.isTrue(Object.keys(d).length > 20); | ||
} | ||
} | ||
} | ||
}; | ||
|
||
|