Skip to content

Commit

Permalink
Remove tests for now
Browse files Browse the repository at this point in the history
Need a better way to test without actually invoking the API.
  • Loading branch information
alexwhitman committed Feb 2, 2022
1 parent 72e856e commit 45a657f
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 1,063 deletions.
4 changes: 2 additions & 2 deletions lib/pushbullet.js
Expand Up @@ -87,15 +87,15 @@ PushBullet.prototype.makeRequest = async function makeRequest(verb, endPoint, op
}
};

if (options.qs) {
if (options && options.qs) {
const url = new URL(endPoint);
Object.keys(options.qs).forEach(function(key) {
url.searchParams.append(key, options.qs[key]);
});
endPoint = url.toString();
}

if (options.json) {
if (options && options.json) {
fetchInit.body = JSON.stringify(options.json);
fetchInit.headers['Content-Type'] = 'application/json';
}
Expand Down

0 comments on commit 45a657f

Please sign in to comment.