Package: node-through2 / 2.0.3-1

test-without-stream-spigot.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Description: test without stream-spigot module
 module is not available in debian
Forwarded: not-needed
Last-Update: 2016-11-29
Author: Jérémy Lal <kapouer@melix.org>
--- a/test/basic-test.js
+++ b/test/basic-test.js
@@ -2,7 +2,6 @@
     , through2 = require('../')
     , crypto   = require('crypto')
     , bl       = require('bl')
-    , spigot   = require('stream-spigot')
 
 test('plain through', function (t) {
   var th2 = through2(function (chunk, enc, callback) {
@@ -215,32 +214,6 @@
   th2.end()
 })
 
-test('pipeable object through ctor', function (t) {
-  t.plan(4)
-
-  var Th2 = through2.ctor({ objectMode: true}, function (record, enc, callback) {
-    if (record.temp != null && record.unit == 'F') {
-      record.temp = ( ( record.temp - 32 ) * 5 ) / 9
-      record.unit = 'C'
-    }
-    this.push(record)
-    callback()
-  })
-
-  var th2 = Th2()
-
-  var expect = [-19, -40, 100, 22]
-  th2.on('data', function (o) {
-    t.deepEqual(o, { temp: expect.shift(), unit: 'C' }, 'got transformed object')
-  })
-
-  spigot({objectMode: true}, [
-    {temp: -2.2, unit: 'F'},
-    {temp: -40, unit: 'F'},
-    {temp: 212, unit: 'F'},
-    {temp: 22, unit: 'C'}
-  ]).pipe(th2)
-})
 
 test('object through ctor override', function (t) {
   t.plan(3)
@@ -358,4 +331,4 @@
 
   th.destroy()
   th.destroy()
-})
\ No newline at end of file
+})