[Pkg-javascript-commits] [node-detective] 29/119: add failing test with chaining on require

Bastien Roucariès rouca at moszumanska.debian.org
Wed Sep 6 09:44:32 UTC 2017


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

rouca pushed a commit to branch master
in repository node-detective.

commit fa9c09705cfe473f13dc0c2d843bcc24170cff9d
Author: Dominic Tarr <dominic.tarr at gmail.com>
Date:   Tue Apr 24 00:46:18 2012 +1200

    add failing test with chaining on require
---
 test/chained.js       | 9 +++++++++
 test/files/chained.js | 5 +++++
 2 files changed, 14 insertions(+)

diff --git a/test/chained.js b/test/chained.js
new file mode 100644
index 0000000..307c201
--- /dev/null
+++ b/test/chained.js
@@ -0,0 +1,9 @@
+var test = require('tap').test;
+var detective = require('../');
+var fs = require('fs');
+var src = fs.readFileSync(__dirname + '/files/chained.js');
+
+test('chained', function (t) {
+    t.deepEqual(detective(src), [ 'c', 'b', 'a' ]);
+    t.end();
+});
diff --git a/test/files/chained.js b/test/files/chained.js
new file mode 100644
index 0000000..63437cc
--- /dev/null
+++ b/test/files/chained.js
@@ -0,0 +1,5 @@
+
+
+require('c').hello().goodbye()
+require('b').hello()
+require('a')

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



More information about the Pkg-javascript-commits mailing list