[Pkg-javascript-commits] [node-module-deps] 367/444: Add failing test for #73
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:48:14 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 385514cdb4fe30776c4227ba804421e51556038b
Author: Patrick Mowrer <pmowrer at gmail.com>
Date: Mon Apr 20 16:29:40 2015 -0400
Add failing test for #73
---
test/pkg.js | 9 ++++++---
test/pkg/main.js | 3 ++-
test/pkg/node_modules/pkga/main.js | 0
test/pkg/node_modules/pkga/package.json | 4 ++++
test/pkg/node_modules/pkgb/main.js | 1 +
test/pkg/node_modules/pkgb/node_modules/pkgc/main.js | 0
test/pkg/node_modules/pkgb/node_modules/pkgc/package.json | 4 ++++
test/pkg/node_modules/pkgb/package.json | 4 ++++
test/pkg/package.json | 5 ++++-
9 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/test/pkg.js b/test/pkg.js
index 2d9d614..a16dc71 100644
--- a/test/pkg.js
+++ b/test/pkg.js
@@ -1,15 +1,18 @@
var mdeps = require('../');
var test = require('tape');
var path = require('path');
+var fs = require('fs');
-var pkg = require('./pkg/package.json');
-pkg.__dirname = path.join(__dirname, '/pkg');
+var dirname = path.join(__dirname, '/pkg');
test('pkg', function (t) {
- t.plan(1);
+ t.plan(4);
var d = mdeps();
d.on('package', function (pkg_) {
+ var pkg = JSON.parse(fs.readFileSync(dirname + pkg_.dir + '/package.json'));
+ pkg.__dirname = dirname + pkg_.dir;
+
t.deepEqual(pkg_, pkg);
});
d.end(path.join(__dirname, '/pkg/main.js'));
diff --git a/test/pkg/main.js b/test/pkg/main.js
index 07a8fbf..100fc1f 100644
--- a/test/pkg/main.js
+++ b/test/pkg/main.js
@@ -1 +1,2 @@
-console.log(555)
+require('pkga');
+require('pkgb');
diff --git a/test/pkg/node_modules/pkga/main.js b/test/pkg/node_modules/pkga/main.js
new file mode 100644
index 0000000..e69de29
diff --git a/test/pkg/node_modules/pkga/package.json b/test/pkg/node_modules/pkga/package.json
new file mode 100644
index 0000000..3925f42
--- /dev/null
+++ b/test/pkg/node_modules/pkga/package.json
@@ -0,0 +1,4 @@
+{
+ "dir": "/node_modules/pkga",
+ "main": "main.js"
+}
diff --git a/test/pkg/node_modules/pkgb/main.js b/test/pkg/node_modules/pkgb/main.js
new file mode 100644
index 0000000..ada0195
--- /dev/null
+++ b/test/pkg/node_modules/pkgb/main.js
@@ -0,0 +1 @@
+require('pkgc');
\ No newline at end of file
diff --git a/test/pkg/node_modules/pkgb/node_modules/pkgc/main.js b/test/pkg/node_modules/pkgb/node_modules/pkgc/main.js
new file mode 100644
index 0000000..e69de29
diff --git a/test/pkg/node_modules/pkgb/node_modules/pkgc/package.json b/test/pkg/node_modules/pkgb/node_modules/pkgc/package.json
new file mode 100644
index 0000000..416083c
--- /dev/null
+++ b/test/pkg/node_modules/pkgb/node_modules/pkgc/package.json
@@ -0,0 +1,4 @@
+{
+ "dir": "/node_modules/pkgb/node_modules/pkgc",
+ "main": "main.js"
+}
diff --git a/test/pkg/node_modules/pkgb/package.json b/test/pkg/node_modules/pkgb/package.json
new file mode 100644
index 0000000..3127025
--- /dev/null
+++ b/test/pkg/node_modules/pkgb/package.json
@@ -0,0 +1,4 @@
+{
+ "dir": "/node_modules/pkgb",
+ "main": "main.js"
+}
diff --git a/test/pkg/package.json b/test/pkg/package.json
index cc806a7..e6c480b 100644
--- a/test/pkg/package.json
+++ b/test/pkg/package.json
@@ -1 +1,4 @@
-{ "beep": "boop" }
+{
+ "dir": "",
+ "main": "index.js"
+}
--
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