[Pkg-javascript-commits] [node-detective] 03/119: nested test passes too hooray

Bastien Roucariès rouca at moszumanska.debian.org
Wed Sep 6 09:44:29 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 b0e803262467c8463ff915c8ba94404f57b0be40
Author: James Halliday <mail at substack.net>
Date:   Fri Jun 17 18:01:55 2011 -0700

    nested test passes too hooray
---
 test/files/nested.js | 22 ++++++++++++++++++++++
 test/nested.js       |  8 ++++++++
 2 files changed, 30 insertions(+)

diff --git a/test/files/nested.js b/test/files/nested.js
new file mode 100644
index 0000000..646cf13
--- /dev/null
+++ b/test/files/nested.js
@@ -0,0 +1,22 @@
+
+if (true) {
+    (function () {
+        require('a');
+    })();
+}
+if (false) {
+    (function () {
+        var x = 10;
+        switch (x) {
+            case 1 : require('b'); break;
+            default : break;
+        }
+    })()
+}
+
+function qqq () {
+    require
+        (
+        "c"
+    );
+}
diff --git a/test/nested.js b/test/nested.js
new file mode 100644
index 0000000..e785b6c
--- /dev/null
+++ b/test/nested.js
@@ -0,0 +1,8 @@
+var assert = require('assert');
+var detective = require('../');
+var fs = require('fs');
+var src = fs.readFileSync(__dirname + '/files/nested.js');
+
+exports.nested = function () {
+    assert.deepEqual(detective(src), [ 'a', 'b', 'c' ]);
+};

-- 
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