feat(smartstream): bump dependencies, update build/publish config, refactor tests, and overhaul documentation
This commit is contained in:
@@ -65,4 +65,4 @@ tap.test('should run backpressure test', async (toolsArg) => {
|
||||
await done.promise;
|
||||
});
|
||||
|
||||
await tap.start();
|
||||
export default tap.start();
|
||||
@@ -21,4 +21,4 @@ tap.test('should create a SmartStream from a Buffer', async () => {
|
||||
});
|
||||
});
|
||||
|
||||
tap.start();
|
||||
export default tap.start();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { expect, tap } from '@push.rocks/tapbundle';
|
||||
import * as smartfile from '@push.rocks/smartfile';
|
||||
import * as fs from 'fs';
|
||||
|
||||
import * as smartstream from '../ts/index.js';
|
||||
|
||||
@@ -8,7 +8,7 @@ let testIntake: smartstream.StreamIntake<string>;
|
||||
tap.test('should handle a read stream', async (tools) => {
|
||||
const counter = 0;
|
||||
const streamWrapper = new smartstream.StreamWrapper([
|
||||
smartfile.fsStream.createReadStream('./test/assets/readabletext.txt'),
|
||||
fs.createReadStream('./test/assets/readabletext.txt'),
|
||||
new smartstream.SmartDuplex({
|
||||
writeFunction: async (chunkStringArg: Buffer, streamTools) => {
|
||||
// do something with the stream here
|
||||
@@ -44,7 +44,7 @@ tap.test('should create a valid Intake', async (tools) => {
|
||||
}
|
||||
})
|
||||
)
|
||||
.pipe(smartfile.fsStream.createWriteStream('./test/assets/writabletext.txt'));
|
||||
.pipe(fs.createWriteStream('./test/assets/writabletext.txt'));
|
||||
const testFinished = tools.defer();
|
||||
let counter = 0;
|
||||
testIntake.pushNextObservable.subscribe(() => {
|
||||
@@ -62,4 +62,4 @@ tap.test('should create a valid Intake', async (tools) => {
|
||||
testIntake.signalEnd();
|
||||
});
|
||||
|
||||
tap.start();
|
||||
export default tap.start();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as smartfile from '@push.rocks/smartfile';
|
||||
import * as fs from 'fs';
|
||||
import { expect, tap } from '@push.rocks/tapbundle';
|
||||
|
||||
import * as smartstream from '../ts/smartstream.classes.streamwrapper.js';
|
||||
@@ -6,10 +6,10 @@ import * as smartstream from '../ts/smartstream.classes.streamwrapper.js';
|
||||
let testSmartstream: smartstream.StreamWrapper;
|
||||
tap.test('should combine a stream', async () => {
|
||||
testSmartstream = new smartstream.StreamWrapper([
|
||||
smartfile.fsStream.createReadStream('./test/assets/test.md'),
|
||||
smartfile.fsStream.createWriteStream('./test/assets/testCopy.md'),
|
||||
fs.createReadStream('./test/assets/test.md'),
|
||||
fs.createWriteStream('./test/assets/testCopy.md'),
|
||||
]);
|
||||
await testSmartstream.run();
|
||||
});
|
||||
|
||||
tap.start();
|
||||
export default tap.start();
|
||||
|
||||
@@ -64,4 +64,4 @@ tap.test('WebDuplexStream should handle transform with a write function', async
|
||||
expect(output).toEqual(expectedOutput);
|
||||
});
|
||||
|
||||
tap.start();
|
||||
export default tap.start();
|
||||
Reference in New Issue
Block a user