[Pkg-javascript-commits] [node-lexical-scope] 39/83: failing assign implicit test

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:45:49 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 f6ce4b23f379b7e0e4f141b06d6b848f900b6310
Author: James Halliday <mail at substack.net>
Date:   Sun Mar 31 11:10:19 2013 -0700

    failing assign implicit test
---
 test/assign_implicit.js       | 13 +++++++++++++
 test/files/assign_implicit.js |  2 ++
 2 files changed, 15 insertions(+)

diff --git a/test/assign_implicit.js b/test/assign_implicit.js
new file mode 100644
index 0000000..cd8cb4b
--- /dev/null
+++ b/test/assign_implicit.js
@@ -0,0 +1,13 @@
+var test = require('tape');
+var detect = require('../');
+var fs = require('fs');
+var src = fs.readFileSync(__dirname + '/files/assign_implicit.js');
+
+test('assign from an implicit global', function (t) {
+    t.plan(3);
+    
+    var scope = detect(src);
+    t.same(scope.globals.implicit, [ 'bar' ]);
+    t.same(scope.globals.exported, []);
+    t.same(scope.locals, { '': [ 'foo' ] });
+});
diff --git a/test/files/assign_implicit.js b/test/files/assign_implicit.js
new file mode 100644
index 0000000..a731d1e
--- /dev/null
+++ b/test/files/assign_implicit.js
@@ -0,0 +1,2 @@
+var foo;
+foo = bar;

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