Skip to content

Commit

Permalink
rerun lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sofisl committed Feb 15, 2025
1 parent e15b70f commit b7505ff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function teenyRequest(reqOpts: Options): Request;
function teenyRequest(reqOpts: Options, callback: RequestCallback): void;
function teenyRequest(
reqOpts: Options,
callback?: RequestCallback
callback?: RequestCallback,
): Request | void {
const {uri, options} = requestToFetchOptions(reqOpts);

Expand Down Expand Up @@ -237,7 +237,7 @@ function teenyRequest(
},
(err: Error) => {
callback(err, response, body);
}
},
);
return;
}
Expand All @@ -249,13 +249,13 @@ function teenyRequest(
},
err => {
callback(err, response, body);
}
},
);
},
err => {
teenyRequest.stats.requestFinished();
callback(err, null!, null);
}
},
);
return;
}
Expand Down Expand Up @@ -292,7 +292,7 @@ function teenyRequest(
err => {
teenyRequest.stats.requestFinished();
requestStream.emit('error', err);
}
},
);

// fetch doesn't supply the raw HTTP stream, instead it
Expand Down Expand Up @@ -325,7 +325,7 @@ function teenyRequest(
},
err => {
callback(err, response, body);
}
},
);
return;
}
Expand All @@ -338,13 +338,13 @@ function teenyRequest(
},
err => {
callback(err, response, body);
}
},
);
},
err => {
teenyRequest.stats.requestFinished();
callback(err, null!, null);
}
},
);
return;
}
Expand Down
12 changes: 6 additions & 6 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ describe('teeny', () => {
assert.strictEqual(response.statusCode, 200);
assert.strictEqual(body, '🌍');
scope.done();
}
},
);
});

Expand All @@ -375,7 +375,7 @@ describe('teeny', () => {
assert.strictEqual(response.statusCode, 200);
assert.strictEqual(body, '🌍');
scope.done();
}
},
);
});

Expand Down Expand Up @@ -406,7 +406,7 @@ describe('teeny', () => {
assert.ok(statsStub.requestFinished.calledOnceWithExactly());
scope.done();
done();
}
},
);
});

Expand All @@ -424,7 +424,7 @@ describe('teeny', () => {
assert.ok(statsStub.requestStarting.calledOnceWithExactly());
assert.ok(statsStub.requestFinished.calledOnceWithExactly());
scope.done();
}
},
);
});

Expand All @@ -434,7 +434,7 @@ describe('teeny', () => {
teenyRequest({uri: ''});
},
/Missing uri or url in reqOpts/,
'Did not throw with expected message'
'Did not throw with expected message',
);
});

Expand All @@ -444,7 +444,7 @@ describe('teeny', () => {
teenyRequest({url: ''});
},
/Missing uri or url in reqOpts/,
'Did not throw with expected message'
'Did not throw with expected message',
);
});
});

0 comments on commit b7505ff

Please sign in to comment.