You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

node-github-api

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-github-api - npm Package Compare versions

Comparing version
0.0.1
to
0.0.2
+2
-0
.travis.yml
language: node_js
node_js:
- '0.10'
after_script:
- npm run coveralls

@@ -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": {

'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();