mirror of
https://github.com/all-contributors/cli.git
synced 2025-01-09 13:36:29 +00:00
Small style tweaks
This commit is contained in:
parent
c4d04d00ee
commit
a6b818f755
1 changed files with 6 additions and 6 deletions
|
@ -2,18 +2,18 @@ import test from 'ava';
|
|||
import nock from 'nock';
|
||||
import getUserInfo from './github';
|
||||
|
||||
test.cb('should handle errors', function (t) {
|
||||
test.cb('should handle errors', t => {
|
||||
nock('https://api.github.com')
|
||||
.get('/users/nodisplayname')
|
||||
.replyWithError(404);
|
||||
|
||||
getUserInfo('nodisplayname', function (err) {
|
||||
getUserInfo('nodisplayname', err => {
|
||||
t.truthy(err);
|
||||
t.end();
|
||||
});
|
||||
});
|
||||
|
||||
test.cb('should fill in the name when null is returned', function (t) {
|
||||
test.cb('should fill in the name when null is returned', t => {
|
||||
nock('https://api.github.com')
|
||||
.get('/users/nodisplayname')
|
||||
.reply(200, {
|
||||
|
@ -23,14 +23,14 @@ test.cb('should fill in the name when null is returned', function (t) {
|
|||
html_url: 'https://github.com/nodisplayname'
|
||||
});
|
||||
|
||||
getUserInfo('nodisplayname', function (err, info) {
|
||||
getUserInfo('nodisplayname', (err, info) => {
|
||||
t.falsy(err);
|
||||
t.is(info.name, 'nodisplayname');
|
||||
t.end();
|
||||
});
|
||||
});
|
||||
|
||||
test.cb('should fill in the name when an empty string is returned', function (t) {
|
||||
test.cb('should fill in the name when an empty string is returned', t => {
|
||||
nock('https://api.github.com')
|
||||
.get('/users/nodisplayname')
|
||||
.reply(200, {
|
||||
|
@ -40,7 +40,7 @@ test.cb('should fill in the name when an empty string is returned', function (t)
|
|||
html_url: 'https://github.com/nodisplayname'
|
||||
});
|
||||
|
||||
getUserInfo('nodisplayname', function (err, info) {
|
||||
getUserInfo('nodisplayname', (err, info) => {
|
||||
t.falsy(err);
|
||||
t.is(info.name, 'nodisplayname');
|
||||
t.end();
|
||||
|
|
Loading…
Reference in a new issue