[Pkg-javascript-commits] [node-compressible] 10/13: 0001-fix_upstream_test.patch: do not fail if new mime-db does not have the type require by the tests
Leo Iannacone
l3on-guest at moszumanska.debian.org
Sat Oct 11 12:41:46 UTC 2014
This is an automated email from the git hooks/post-receive script.
l3on-guest pushed a commit to branch master
in repository node-compressible.
commit 8f1198fd254127e634e2b9cb3b5964fa8adbec2b
Author: Leo Iannacone <l3on at ubuntu.com>
Date: Fri Oct 10 12:48:29 2014 +0200
0001-fix_upstream_test.patch: do not fail if new mime-db does not have the type require by the tests
---
.../patches/0000-use_mime-db_from_mime-types.patch | 18 ++++++++++++++----
debian/patches/0001-fix_upstream_test.patch | 20 ++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/debian/patches/0000-use_mime-db_from_mime-types.patch b/debian/patches/0000-use_mime-db_from_mime-types.patch
index 5990911..79a793e 100644
--- a/debian/patches/0000-use_mime-db_from_mime-types.patch
+++ b/debian/patches/0000-use_mime-db_from_mime-types.patch
@@ -4,17 +4,27 @@ Author: Leo Iannacone <l3on at ubuntu.com>
Forwarded: not-needed
---
- index.js | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ index.js | 2 +-
+ test/test.js | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
--- a/index.js
+++ b/index.js
@@ -8,7 +8,7 @@
* Module dependencies.
*/
-
+
-var db = require('mime-db')
+var db = require('mime-types').db
-
+
/**
* Module exports.
+--- a/test/test.js
++++ b/test/test.js
+@@ -1,5 +1,5 @@
+ var assert = require('assert')
+-var db = require('mime-db')
++var db = require('mime-types').db
+ var compressible = require('../')
+
+ // None of these should be actual types so that the lookup will never include them.
diff --git a/debian/patches/0001-fix_upstream_test.patch b/debian/patches/0001-fix_upstream_test.patch
new file mode 100644
index 0000000..8911038
--- /dev/null
+++ b/debian/patches/0001-fix_upstream_test.patch
@@ -0,0 +1,20 @@
+Description: Fix upstream test according with new mime-db.
+ If do not fail if mime-db does not have the type.
+Author: Leo Iannacone <l3on at ubuntu.com>
+Forwarded: not-needed
+
+---
+ test/test.js | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/test/test.js
++++ b/test/test.js
+@@ -36,6 +36,8 @@
+
+ describe('Testing if the regex works as intended.', function () {
+ example_types.forEach(function (example) {
++ if (db[example.type] === undefined)
++ return;
+ it(example.type + ' should' + (example.should ? ' ' : ' not ') + 'be compressible', function () {
+ assert.equal(compressible(example.type), example.should)
+ })
diff --git a/debian/patches/series b/debian/patches/series
index d07adaa..743b9d8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
0000-use_mime-db_from_mime-types.patch
+0001-fix_upstream_test.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-compressible.git
More information about the Pkg-javascript-commits
mailing list