feat(smartstream): bump dependencies, update build/publish config, refactor tests, and overhaul documentation
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user