Skip to content

Commit f6646ab

Browse files
author
Dom Harrington
committed
Prettier
1 parent 5d886b1 commit f6646ab

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

index.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ module.exports = (apiKey, group, options = {}) => {
4545
// this is fine for now
4646
queue.push(constructPayload(req, res, group, options, { startedDateTime }));
4747
if (queue.length >= bufferLength) {
48-
request.post(`${config.host}/request`, {
49-
headers: { authorization: `Basic ${encoded}` },
50-
json: queue,
51-
}).response.then(() => {
52-
queue = [];
53-
});
48+
request
49+
.post(`${config.host}/request`, {
50+
headers: { authorization: `Basic ${encoded}` },
51+
json: queue,
52+
})
53+
.response.then(() => {
54+
queue = [];
55+
});
5456
}
5557

5658
cleanup(); // eslint-disable-line no-use-before-define

test/index.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ describe('@readme/metrics', () => {
5454
});
5555

5656
describe('#bufferLength', () => {
57-
it('should send requests when number hits `bufferLength` size', async function test() {
57+
it('should send requests when number hits `bufferLength` size', async function test() {
5858
this.timeout(5000);
5959

6060
const group = '5afa21b97011c63320226ef3';
6161

6262
const mock = nock(config.host)
63-
.post('/request', (body) => {
63+
.post('/request', body => {
6464
assert.equal(body.length, 3);
6565
return true;
6666
})

0 commit comments

Comments
 (0)