UNPKG

task-read

Version:

A node-task to read inputs into Records using any RecordIO interface.

21 lines (19 loc) 549 B
var Read = require('../lib/read'); exports['Read'] = { '#run': function (test) { test.expect(3); var task = new Read(); var input = [{ src: ['test/fixtures/foo.txt', 'test/fixtures/bar.txt', 'test/fixtures/baz.txt'], dest: 'tmp/combined.txt' }]; task.run({}, input).then(function(records) { test.equal(records[0].src[0].toString(), 'foo'); test.equal(records[0].src[1].toString(), 'bar'); test.equal(records[0].src[2].toString(), 'baz'); test.done(); }); } };