Skip to content

Instantly share code, notes, and snippets.

@rajikaimal
Created January 14, 2017 11:46
Show Gist options
  • Select an option

  • Save rajikaimal/48c88243b4bb2e40c0668403a9c7fbf5 to your computer and use it in GitHub Desktop.

Select an option

Save rajikaimal/48c88243b4bb2e40c0668403a9c7fbf5 to your computer and use it in GitHub Desktop.
Unit tests for github-followers
const assert = require('chai').assert;
const ghFollowers = require('../index');
describe('github-followers', function() {
it('should return an array of objects', function(done) {
ghFollowers('rajikaimal')
.then(res => {
assert.typeOf(res, 'array');
done();
})
.catch(err => {
console.log('error', err);
done();
})
});
it('should return an object', function(done) {
ghFollowers('')
.then(res => {
assert.typeOf(res, 'object');
done();
})
.catch(err => {
console.log('error', err);
done();
})
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment