mirror of
https://github.com/bcomnes/deploy-to-neocities.git
synced 2026-01-21 08:51:54 +00:00
commit node_modules
This commit is contained in:
18
node_modules/fetch-errors/test.js
generated
vendored
Normal file
18
node_modules/fetch-errors/test.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import tape from 'tape';
|
||||
import ptape from 'tape-promise';
|
||||
import { handleResponse } from './main';
|
||||
import fetch from 'node-fetch';
|
||||
const test = ptape(tape);
|
||||
|
||||
test('handleResponse', async t => {
|
||||
return fetch('https://api.github.com/users/bcomnes/repos')
|
||||
.then(response => {
|
||||
t.ok(response.ok);
|
||||
return response;
|
||||
})
|
||||
.then(handleResponse)
|
||||
.then(json => {
|
||||
t.ok(json);
|
||||
})
|
||||
.catch(t.error);
|
||||
});
|
||||
Reference in New Issue
Block a user