fix(core): update
This commit is contained in:
@ -10,7 +10,7 @@ tap.test('should handle a read stream', async (tools) => {
|
||||
const streamWrapper = new smartstream.StreamWrapper([
|
||||
smartfile.fsStream.createReadStream('./test/assets/readabletext.txt'),
|
||||
new smartstream.SmartDuplex({
|
||||
writeAndTransformFunction: async (chunkStringArg: Buffer, streamTools) => {
|
||||
writeFunction: async (chunkStringArg: Buffer, streamTools) => {
|
||||
// do something with the stream here
|
||||
const result = chunkStringArg.toString().substr(0, 100);
|
||||
streamTools.push('wow =========== \n');
|
||||
@ -21,7 +21,7 @@ tap.test('should handle a read stream', async (tools) => {
|
||||
},
|
||||
}),
|
||||
new smartstream.SmartDuplex({
|
||||
writeAndTransformFunction: async (chunkStringArg) => {
|
||||
writeFunction: async (chunkStringArg) => {
|
||||
console.log(chunkStringArg.toString());
|
||||
},
|
||||
finalFunction: async (tools) => {
|
||||
@ -37,7 +37,7 @@ tap.test('should create a valid Intake', async (tools) => {
|
||||
testIntake.pipe(
|
||||
new smartstream.SmartDuplex({
|
||||
objectMode: true,
|
||||
writeAndTransformFunction: async (chunkStringArg: string, streamTools) => {
|
||||
writeFunction: async (chunkStringArg: string, streamTools) => {
|
||||
await tools.delayFor(100);
|
||||
console.log(chunkStringArg);
|
||||
return chunkStringArg;
|
||||
|
Reference in New Issue
Block a user