[Pkg-javascript-commits] [node-chai] 01/04: fix tests with type-detect 4.0

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Sat Nov 5 16:55:59 UTC 2016


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

praveen pushed a commit to branch master
in repository node-chai.

commit 4bcd418bdbecf9899265ea17ad65e168a7e1096a
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Sat Nov 5 22:06:06 2016 +0530

    fix tests with type-detect 4.0
---
 debian/control                               | 12 +++++++---
 debian/patches/port-to-type-detect-4.0.patch | 35 ++++++++++++++++++++++++++++
 debian/patches/series                        |  1 +
 3 files changed, 45 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index ab915b0..e94df07 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,9 @@ Build-Depends:
  debhelper (>= 9)
  , dh-buildinfo
  , nodejs
+ , node-type-detect (>= 1.0.0)
+ , node-assertion-error (>= 1.0.1)
+ , node-deep-eql (>= 2.0~)
 Standards-Version: 3.9.8
 Homepage: http://chaijs.com
 Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-chai.git
@@ -19,8 +22,11 @@ Depends:
  , nodejs
  , node-type-detect (>= 1.0.0)
  , node-assertion-error (>= 1.0.1)
- , node-deep-eql (>= 0.1.3)
-Description: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
- FIX_ME long description
+ , node-deep-eql (>= 2.0~)
+Description: BDD/TDD assertion library for node.js and the browser.
+ Chai is a BDD / TDD assertion library for [node](http://nodejs.org) and the
+ browser that can be delightfully paired with any javascript testing framework.
+ .
+ This library is test framework agnostic.
  .
  Node.js is an event-based server-side JavaScript engine.
diff --git a/debian/patches/port-to-type-detect-4.0.patch b/debian/patches/port-to-type-detect-4.0.patch
new file mode 100644
index 0000000..39ee45c
--- /dev/null
+++ b/debian/patches/port-to-type-detect-4.0.patch
@@ -0,0 +1,35 @@
+commit d3434bb5e649d1581b53cf3ce7242b0a8ceae1d4
+Author: Shanavas M <shanavas at disroot.org>
+Date:   Fri Nov 4 13:35:31 2016 +0000
+
+    Use type-detect at 1.0.0 like object type names
+
+diff --git a/lib/chai/utils/expectTypes.js b/lib/chai/utils/expectTypes.js
+index 4dd5b29..eec10b3 100644
+--- a/lib/chai/utils/expectTypes.js
++++ b/lib/chai/utils/expectTypes.js
+@@ -34,7 +34,7 @@ module.exports = function (obj, types) {
+     return or + art + ' ' + t;
+   }).join(', ');
+ 
+-  if (!types.some(function (expected) { return type(obj) === expected; })) {
++  if (!types.some(function (expected) { return type(obj).toLowerCase() === expected; })) {
+     throw new AssertionError(
+       'object tested must be ' + str + ', but ' + type(obj) + ' given'
+     );
+diff --git a/lib/chai/utils/index.js b/lib/chai/utils/index.js
+index 3f9bf6e..be87fb7 100644
+--- a/lib/chai/utils/index.js
++++ b/lib/chai/utils/index.js
+@@ -20,7 +20,10 @@ exports.test = require('./test');
+  * type utility
+  */
+ 
+-exports.type = require('type-detect');
++var type = require('type-detect');
++exports.type = function (obj) {
++  return type(obj).toLowerCase();
++};
+ 
+ /*!
+  * expectTypes utility
diff --git a/debian/patches/series b/debian/patches/series
index 024cf65..24bce48 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 remove-npm-install.patch
+port-to-type-detect-4.0.patch

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



More information about the Pkg-javascript-commits mailing list