update smartstream

This commit is contained in:
2017-06-30 18:32:32 +02:00
parent f8b79710be
commit 93bcc03e72
11 changed files with 250 additions and 160 deletions

1
test/test.d.ts vendored
View File

@ -1 +0,0 @@
import 'typings-test';

View File

@ -1,19 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("typings-test");
const fs = require("fs");
const smartstream = require("../dist/index");
let testSmartstream;
describe('smartstream', function () {
it('should combine a stream', function (done) {
this.timeout(5000);
testSmartstream = new smartstream.Smartstream([
fs.createReadStream('./test/assets/test.md'),
fs.createWriteStream('./test/assets/testCopy.md')
]);
testSmartstream.run().then(() => {
done();
});
});
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx3QkFBcUI7QUFDckIseUJBQXlCO0FBR3pCLDZDQUE0QztBQUU1QyxJQUFJLGVBQXdDLENBQUE7QUFFNUMsUUFBUSxDQUFDLGFBQWEsRUFBRTtJQUNwQixFQUFFLENBQUMseUJBQXlCLEVBQUUsVUFBUyxJQUFJO1FBQ3ZDLElBQUksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUE7UUFDbEIsZUFBZSxHQUFHLElBQUksV0FBVyxDQUFDLFdBQVcsQ0FBQztZQUMxQyxFQUFFLENBQUMsZ0JBQWdCLENBQUMsdUJBQXVCLENBQUM7WUFDNUMsRUFBRSxDQUFDLGlCQUFpQixDQUFDLDJCQUEyQixDQUFDO1NBQ3BELENBQUMsQ0FBQTtRQUNGLGVBQWUsQ0FBQyxHQUFHLEVBQUUsQ0FBQyxJQUFJLENBQUM7WUFDdkIsSUFBSSxFQUFFLENBQUE7UUFDVixDQUFDLENBQUMsQ0FBQTtJQUNOLENBQUMsQ0FBQyxDQUFBO0FBQ04sQ0FBQyxDQUFDLENBQUEifQ==

View File

@ -1,20 +1,15 @@
import 'typings-test'
import fs = require('fs')
import * as should from 'should'
import { expect, tap } from 'tapbundle'
import * as smartstream from '../dist/index'
let testSmartstream: smartstream.Smartstream
tap.test('should combine a stream', async () => {
testSmartstream = new smartstream.Smartstream([
fs.createReadStream('./test/assets/test.md'),
fs.createWriteStream('./test/assets/testCopy.md')
])
await testSmartstream.run()
})
describe('smartstream', function() {
it('should combine a stream', function(done){
this.timeout(5000)
testSmartstream = new smartstream.Smartstream([
fs.createReadStream('./test/assets/test.md'),
fs.createWriteStream('./test/assets/testCopy.md')
])
testSmartstream.run().then(() => {
done()
})
})
})
tap.start()