Created
January 14, 2017 11:46
-
-
Save rajikaimal/48c88243b4bb2e40c0668403a9c7fbf5 to your computer and use it in GitHub Desktop.
Unit tests for github-followers
This file contains hidden or 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
| 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