[Pkg-javascript-commits] [node-through2] 18/21: Fix test without stream-spigot module

Jérémy Lal kapouer at moszumanska.debian.org
Mon Nov 28 23:35:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

kapouer pushed a commit to branch master
in repository node-through2.

commit 6b63720d300202aa8a91dea6d62600334d385249
Author: Jérémy Lal <kapouer at melix.org>
Date:   Tue Nov 29 00:31:20 2016 +0100

    Fix test without stream-spigot module
---
 debian/patches/series                           |  1 +
 debian/patches/test-without-stream-spigot.patch | 55 +++++++++++++++++++++++++
 2 files changed, 56 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 130c7fc..8911f69 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+test-without-stream-spigot.patch
 0001_remove-readable-stream.patch
diff --git a/debian/patches/test-without-stream-spigot.patch b/debian/patches/test-without-stream-spigot.patch
new file mode 100644
index 0000000..271900a
--- /dev/null
+++ b/debian/patches/test-without-stream-spigot.patch
@@ -0,0 +1,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 at 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
++})

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-through2.git



More information about the Pkg-javascript-commits mailing list