From 350e08e59f7ce6b9a08a2162f58e8dfcdab2d0c5 Mon Sep 17 00:00:00 2001 From: Georgios Valotasios Date: Sun, 20 Dec 2015 19:40:00 +0100 Subject: [PATCH] Added tests for the old version of the definitions --- through2/through2-0.4.2-test.ts | 44 +++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 through2/through2-0.4.2-test.ts diff --git a/through2/through2-0.4.2-test.ts b/through2/through2-0.4.2-test.ts new file mode 100644 index 000000000..79bfef2e2 --- /dev/null +++ b/through2/through2-0.4.2-test.ts @@ -0,0 +1,44 @@ +/// +/// + +import through2 = require('through2'); + +var rws: NodeJS.ReadWriteStream; + +rws = through2({ + objectMode: true, + allowHalfOpen: true +}, function (entry: any, enc: string, callback: () => void) { + this.push('foo'); + callback(); +}, () => { + +}); + +rws = through2(function (entry: any, enc: string, callback: () => void) { + this.push('foo'); + callback(); +}, () => { + +}); + +rws = through2(function (entry: any, enc: string, callback: () => void) { + this.push('foo'); + callback(); +}); + +rws = through2(); + +// obj +rws = through2.obj(function (entry: any, enc: string, callback: () => void) { + this.push('foo'); + callback(); +}, () => { + +}); + +rws = through2.obj(function (entry: any, enc: string, callback: () => void) { + this.push('foo'); + callback(); +}); +