[Pkg-javascript-commits] [node-lexical-scope] 16/83: failing right-hand globals test
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:45:46 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-lexical-scope.
commit 0b1708f08909cb9cdd45f78edebeba20b85f49ce
Author: James Halliday <mail at substack.net>
Date: Tue Feb 19 23:30:55 2013 -0800
failing right-hand globals test
---
test/files/right_hand.js | 2 ++
test/right_hand.js | 14 ++++++++++++++
test/sources/right_hand.js | 1 +
3 files changed, 17 insertions(+)
diff --git a/test/files/right_hand.js b/test/files/right_hand.js
new file mode 100644
index 0000000..85dc112
--- /dev/null
+++ b/test/files/right_hand.js
@@ -0,0 +1,2 @@
+exports.filename = __filename;
+exports.dirname = __dirname;
diff --git a/test/right_hand.js b/test/right_hand.js
new file mode 100644
index 0000000..2329773
--- /dev/null
+++ b/test/right_hand.js
@@ -0,0 +1,14 @@
+var test = require('tape');
+var detect = require('../');
+var src = require('./sources/right_hand.js');
+
+test('globals on the right-hand of assignment', function (t) {
+ t.plan(3);
+
+ var scope = detect(src);
+ t.same(scope.globals.implicit, [
+ 'exports', '__dirname', '__filename'
+ ]);
+ t.same(scope.globals.exported, []);
+ t.same(scope.locals, { '': [] });
+});
diff --git a/test/sources/right_hand.js b/test/sources/right_hand.js
new file mode 100644
index 0000000..11584d8
--- /dev/null
+++ b/test/sources/right_hand.js
@@ -0,0 +1 @@
+module.exports = "exports.filename = __filename;\nexports.dirname = __dirname;\n"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-lexical-scope.git
More information about the Pkg-javascript-commits
mailing list