node-github-api
Advanced tools
+2
-0
| language: node_js | ||
| node_js: | ||
| - '0.10' | ||
| after_script: | ||
| - npm run coveralls |
+6
-0
@@ -9,2 +9,3 @@ 'use strict'; | ||
| var bump = require('gulp-bump'); | ||
| var _ = require('lodash'); | ||
@@ -43,3 +44,8 @@ var paths = { | ||
| gulp.task('watch', function () { | ||
| gulp.run('istanbul'); | ||
| gulp.watch(_.union(paths.lint, paths.tests), ['istanbul']); | ||
| }); | ||
| gulp.task('test', ['lint', 'istanbul']); | ||
| gulp.task('release', ['bump']); |
+3
-2
| { | ||
| "name": "node-github-api", | ||
| "description": "retrieve github stars", | ||
| "version": "0.0.1", | ||
| "version": "0.0.2", | ||
| "homepage": "https://github.com/kwakayama/node-github-api", | ||
@@ -32,3 +32,4 @@ "bugs": "https://github.com/kwakayama/node-github-api/issues", | ||
| "should": "^3.3.1", | ||
| "jshint-stylish": "^0.2.0" | ||
| "jshint-stylish": "^0.2.0", | ||
| "sinon": "^1.9.1" | ||
| }, | ||
@@ -35,0 +36,0 @@ "scripts": { |
+13
-4
| 'use strict'; | ||
| var Github = require('../'); | ||
| var assert = require('should'); | ||
| var should = require('should'); | ||
| var sinon = require('sinon'); | ||
@@ -16,10 +17,17 @@ describe('githubApi', function () { | ||
| github.githubApi.repos.getStarredFromUser = function(settings, cb) { | ||
| cb(null, [{id:1002}, {id:1001}, {id:1000}]) | ||
| } | ||
| sinon.stub(github.githubApi.repos, 'getStarredFromUser', function(settings, cb) { | ||
| cb(null, [{id:1002}, {id:1001}, {id:1000}]); | ||
| }); | ||
| }); | ||
| afterEach(function () { | ||
| github.githubApi.repos.getStarredFromUser.restore(); | ||
| }); | ||
| it('should return a list of all starred repos', function (cb) { | ||
| github.getStars('username') | ||
| .then(function(stars) { | ||
| github.githubApi.repos.getStarredFromUser.called.should.be.true; | ||
| stars.should.have.a.lengthOf(3); | ||
@@ -33,2 +41,3 @@ cb(); | ||
| .then(function(stars) { | ||
| github.githubApi.repos.getStarredFromUser.called.should.be.true; | ||
| stars.should.have.a.lengthOf(2); | ||
@@ -35,0 +44,0 @@ cb(); |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
11696
4.37%228
5.07%10
11.11%