[Pkg-javascript-commits] [node-log-driver] 08/15: merge patched into master
Bastien Roucariès
rouca at moszumanska.debian.org
Wed Sep 6 09:49:10 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-log-driver.
commit 2ecee9ed70b3df9855efdfd101366eaae3ab66e1
Merge: c02b858 1d68724
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date: Thu Aug 24 22:37:30 2017 +0200
merge patched into master
debian/.git-dpm | 4 +--
.../0001-Use-sinon-instead-of-sinon-restore.patch | 37 ++++++++++++++++++++++
debian/patches/0002-Fix-test-suite.patch | 32 +++++++++++++++++++
debian/patches/series | 2 ++
test/index.js | 18 ++++++-----
5 files changed, 83 insertions(+), 10 deletions(-)
diff --cc debian/.git-dpm
index aa787cf,0000000..8f4c3a2
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,8 -1,0 +1,8 @@@
+# see git-dpm(1) from git-dpm package
- 3a631e9b033112a06e73f46796739ad5d43c37e2
- 3a631e9b033112a06e73f46796739ad5d43c37e2
++1d68724ff266449488ff00db4f640d31c7990cf4
++1d68724ff266449488ff00db4f640d31c7990cf4
+3a631e9b033112a06e73f46796739ad5d43c37e2
+3a631e9b033112a06e73f46796739ad5d43c37e2
+node-log-driver_1.2.5+2017301git8cfc1bf3f8f2fa38a3+dsfg.orig.tar.xz
+5f0fcdfbb45f70ad40e67dbdd3b86fad57e5335d
+17228
diff --cc debian/patches/0001-Use-sinon-instead-of-sinon-restore.patch
index 0000000,0000000..e958371
new file mode 100644
--- /dev/null
+++ b/debian/patches/0001-Use-sinon-instead-of-sinon-restore.patch
@@@ -1,0 -1,0 +1,37 @@@
++From 52b582eadcab70f2b8e6d7578317f256cfb45321 Mon Sep 17 00:00:00 2001
++From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien at gmail.com>
++Date: Thu, 24 Aug 2017 22:27:30 +0200
++Subject: Use sinon instead of sinon-restore
++
++Forwarded: no
++---
++ test/index.js | 6 ++++--
++ 1 file changed, 4 insertions(+), 2 deletions(-)
++
++diff --git a/test/index.js b/test/index.js
++index 776b426..7b5f3de 100644
++--- a/test/index.js
+++++ b/test/index.js
++@@ -1,10 +1,12 @@
++ var should = require('should');
++ var logger = require('../index');
++ var defaultLogger = require('../index').logger;
++-var sinon = require('sinon-restore');
+++var sinonbase = require('sinon');
++ var logged = "";
++ var oldConsoleLog = console.log;
++
+++var sinon = sinonbase.sandbox.create();
+++
++ /* NOTE: console.log is mocked in these tests, so any uses of it will be
++ * appended to the variabled "logged". This will include any calls you
++ * make to console.log() for the purpose of debugging in these tests.
++@@ -22,7 +24,7 @@ describe("logdriver", function(){
++ });
++ });
++ afterEach(function(){
++- sinon.restoreAll();
+++ sinon.reset();
++ console.log = oldConsoleLog;
++ logged = "";
++ });
diff --cc debian/patches/0002-Fix-test-suite.patch
index 0000000,0000000..bf06053
new file mode 100644
--- /dev/null
+++ b/debian/patches/0002-Fix-test-suite.patch
@@@ -1,0 -1,0 +1,32 @@@
++From 1d68724ff266449488ff00db4f640d31c7990cf4 Mon Sep 17 00:00:00 2001
++From: =?UTF-8?q?Bastien=20ROUCARI=C3=88S?= <roucaries.bastien at gmail.com>
++Date: Thu, 24 Aug 2017 22:35:33 +0200
++Subject: Fix test suite
++
++---
++ test/index.js | 12 ++++++------
++ 1 file changed, 6 insertions(+), 6 deletions(-)
++
++diff --git a/test/index.js b/test/index.js
++index 7b5f3de..d631144 100644
++--- a/test/index.js
+++++ b/test/index.js
++@@ -59,12 +59,12 @@ describe("logdriver", function(){
++ mylogger.error("error test");
++ mylogger.trace("trace test");
++ var lines = logged.split("\n");
++- lines[0].should.include('[info]');
++- lines[1].should.include('[warn]');
++- lines[2].should.include('[error]');
++- lines[0].should.include('info test');
++- lines[1].should.include('warn test');
++- lines[2].should.include('error test');
+++ should.ok(lines[0].includes('[info]'));
+++ should.ok(lines[1].includes('[warn]'));
+++ should.ok(lines[2].includes('[error]'));
+++ should.ok(lines[0].includes('info test'));
+++ should.ok(lines[1].includes('warn test'));
+++ should.ok(lines[2].includes('error test'));
++
++ });
++
diff --cc debian/patches/series
index 0000000,0000000..4ff45a3
new file mode 100644
--- /dev/null
+++ b/debian/patches/series
@@@ -1,0 -1,0 +1,2 @@@
++0001-Use-sinon-instead-of-sinon-restore.patch
++0002-Fix-test-suite.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-log-driver.git
More information about the Pkg-javascript-commits
mailing list