[Pkg-javascript-commits] [node-module-deps] 198/444: fixed deps test
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:47:55 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-module-deps.
commit e8394974eb4f0d471f88fb96194228bfc2f9809f
Author: James Halliday <mail at substack.net>
Date: Thu May 8 23:06:54 2014 -0700
fixed deps test
---
index.js | 2 +-
test/deps.js | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/index.js b/index.js
index 805e4a3..b8d796e 100644
--- a/index.js
+++ b/index.js
@@ -281,7 +281,7 @@ Deps.prototype.walk = function (id, parent, cb) {
if (--p === 0) done();
return;
}
- self.walk(id, current, function (r) {
+ self.walk(id, current, function (err, r) {
resolved[id] = r;
if (--p === 0) done();
});
diff --git a/test/deps.js b/test/deps.js
index 097438e..90a873e 100644
--- a/test/deps.js
+++ b/test/deps.js
@@ -1,7 +1,6 @@
var parser = require('../');
var test = require('tape');
var fs = require('fs');
-var typewise = require('typewise');
var files = {
main: __dirname + '/files/main.js',
@@ -21,7 +20,7 @@ test('deps', function (t) {
p.on('data', function (row) { rows.push(row) });
p.on('end', function () {
- t.same(rows.sort(typewise.compare), [
+ t.same(rows.sort(cmp), [
{
id: files.main,
source: sources.main,
@@ -38,6 +37,8 @@ test('deps', function (t) {
source: sources.bar,
deps: {}
}
- ].sort(typewise.compare));
+ ].sort(cmp));
});
});
+
+function cmp (a, b) { return a.id < b.id ? -1 : 1 }
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-module-deps.git
More information about the Pkg-javascript-commits
mailing list