[Pkg-javascript-commits] [node-module-deps] 211/444: failing cycle test
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:47:56 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 a89b6a8eda94b4046be1e15c7a9420292967c375
Author: James Halliday <mail at substack.net>
Date: Fri May 9 14:35:35 2014 -0700
failing cycle test
---
test/cycle.js | 17 +++++++++++++++++
test/cycle/bar.js | 3 +++
test/cycle/foo.js | 4 ++++
test/cycle/main.js | 4 ++++
4 files changed, 28 insertions(+)
diff --git a/test/cycle.js b/test/cycle.js
new file mode 100644
index 0000000..20e8087
--- /dev/null
+++ b/test/cycle.js
@@ -0,0 +1,17 @@
+var mdeps = require('../');
+var test = require('tape');
+var JSONStream = require('JSONStream');
+var packer = require('browser-pack');
+var concat = require('concat-stream');
+
+test('cycle', function (t) {
+ t.plan(1);
+ var p = mdeps(__dirname + '/cycle/main.js');
+ var pack = packer();
+
+ p.pipe(JSONStream.stringify()).pipe(pack).pipe(concat(function (src) {
+ Function('console', src.toString('utf8'))({
+ log: function (msg) { t.equal(msg, 333) }
+ });
+ }));
+});
diff --git a/test/cycle/bar.js b/test/cycle/bar.js
new file mode 100644
index 0000000..c78d1a5
--- /dev/null
+++ b/test/cycle/bar.js
@@ -0,0 +1,3 @@
+var foo = require('./foo.js');
+
+module.exports = function (n) { return foo.p(n, 1) };
diff --git a/test/cycle/foo.js b/test/cycle/foo.js
new file mode 100644
index 0000000..1744968
--- /dev/null
+++ b/test/cycle/foo.js
@@ -0,0 +1,4 @@
+var bar = require('./bar.js');
+
+exports.ooo = function (n) { return n * bar(110) };
+exports.p = function (a, b) { return a + b }
diff --git a/test/cycle/main.js b/test/cycle/main.js
new file mode 100644
index 0000000..6601355
--- /dev/null
+++ b/test/cycle/main.js
@@ -0,0 +1,4 @@
+var foo = require('./foo.js');
+var bar = require('./bar.js');
+
+console.log(foo.ooo(bar(2)));
--
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