Skip to content

Commit 1ef7d4b

Browse files
committed
Respond to code comments: Add description, use const and rename test.
1 parent f0bc017 commit 1ef7d4b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

component.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
}
4040
},
4141
"write_attachment": {
42+
"description":
43+
"Multiple incoming events can be combined into one CSV file with the write CSV action. See https://github.com/elasticio/csv-component/ for additional documentation.",
4244
"main": "./lib/actions/write.js",
4345
"title": "Write CSV attachment",
4446
"fields": {

lib/actions/write.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const _ = require('lodash');
77
const messages = require('elasticio-node').messages;
88
const client = require('elasticio-rest-node')();
99

10+
const TIMEOUT_BETWEEN_EVENTS = 10000;
11+
1012
let stringifier;
1113
let signedUrl;
1214
let timeout;
@@ -72,7 +74,7 @@ exports.process = function ProcessAction(msg, cfg) {
7274

7375
yield exports.init(cfg);
7476
});
75-
}, 10000);
77+
}, TIMEOUT_BETWEEN_EVENTS);
7678

7779
let row = msg.body;
7880
if (cfg.writer.columns) {

spec/read.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ describe('CSV Read component', function CsvReadComponentTests() {
3737
}
3838

3939

40-
it('empty body', function emptyBodyTest(done) {
41-
runTest(csv.process, {}, {}, function emptyBodyTestAssertions(runner) {
40+
it('should handle empty body', function handleEmptyBodyTest(done) {
41+
runTest(csv.process, {}, {}, function handleEmptyBodyTestAssertions(runner) {
4242
expect(runner.data.length).to.equal(0);
4343
expect(runner.errors.length).to.equal(1);
4444
expect(runner.snapshot).to.be.undefined;

0 commit comments

Comments
 (0)